Ursprung
bc39fa4473
Commit
b0444cbe8e
@ -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) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren