Skip to content

Commit

Permalink
nevermind
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey0980 committed Apr 12, 2023
1 parent de5dc84 commit b32d2e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package systems.joey.manhunt.listeners;

import net.kyori.adventure.text.format.TextColor;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
Expand Down Expand Up @@ -27,7 +28,7 @@ public void PlayerInteractEvent(PlayerInteractEvent event) {
Player player = event.getPlayer();
Player target = getPlayer(Manhunt.getTracked());

if (target != null && target.getWorld() != player.getWorld()) {
if (target != null || target.getWorld() != player.getWorld()) {
World world = player.getWorld();
CompassMeta meta = (CompassMeta) event.getItem().getItemMeta();
switch (player.getWorld().getEnvironment()) {
Expand All @@ -40,7 +41,7 @@ public void PlayerInteractEvent(PlayerInteractEvent event) {
case NETHER, THE_END -> {
meta.setLodestone(target.getLocation());
meta.setLodestoneTracked(false);
meta.setDisplayName("Compass");
meta.setDisplayName(ChatColor.WHITE + "Compass");
event.getItem().setItemMeta(meta);
}
}
Expand Down

0 comments on commit b32d2e3

Please sign in to comment.