diff --git a/src/de/steamwar/lobby/listener/TeleporterListener.java b/src/de/steamwar/lobby/listener/TeleporterListener.java index c3e8f69..84ff9fa 100644 --- a/src/de/steamwar/lobby/listener/TeleporterListener.java +++ b/src/de/steamwar/lobby/listener/TeleporterListener.java @@ -56,7 +56,7 @@ public class TeleporterListener extends BasicListener{ player.openInventory(inventory); } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler public void handlePlayerInventoryInteract(InventoryClickEvent event) { Player player = (Player) event.getWhoClicked(); ItemStack item = event.getCurrentItem(); @@ -64,6 +64,8 @@ public class TeleporterListener extends BasicListener{ if(item == null) return; + if(event.getClickedInventory().getContents() != inventory.getContents()) return; + if(item.getType() == Material.MAGMA_CREAM) { player.teleport(spawn); }else if(item.getType() == Material.BEACON) {