added EventHandler for SwapItemsInHands as expansion for the
InventorryClick Eventhandler
Dieser Commit ist enthalten in:
Ursprung
81e8d19f70
Commit
7a8b4a228d
@ -6,6 +6,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
||||
|
||||
public class PlayerInventoryListener implements Listener {
|
||||
|
||||
@ -23,6 +24,11 @@ public class PlayerInventoryListener implements Listener {
|
||||
public void handleInventoryClick(InventoryClickEvent event) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handlePlayerSwapHandItemsEvent(PlayerSwapHandItemsEvent event) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren