Ursprung
bc39fa4473
Commit
b0444cbe8e
@ -56,7 +56,7 @@ public class TeleporterListener extends BasicListener{
|
|||||||
player.openInventory(inventory);
|
player.openInventory(inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler
|
||||||
public void handlePlayerInventoryInteract(InventoryClickEvent event) {
|
public void handlePlayerInventoryInteract(InventoryClickEvent event) {
|
||||||
Player player = (Player) event.getWhoClicked();
|
Player player = (Player) event.getWhoClicked();
|
||||||
ItemStack item = event.getCurrentItem();
|
ItemStack item = event.getCurrentItem();
|
||||||
@ -64,6 +64,8 @@ public class TeleporterListener extends BasicListener{
|
|||||||
if(item == null)
|
if(item == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(event.getClickedInventory().getContents() != inventory.getContents()) return;
|
||||||
|
|
||||||
if(item.getType() == Material.MAGMA_CREAM) {
|
if(item.getType() == Material.MAGMA_CREAM) {
|
||||||
player.teleport(spawn);
|
player.teleport(spawn);
|
||||||
}else if(item.getType() == Material.BEACON) {
|
}else if(item.getType() == Material.BEACON) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren