mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-12-22 16:18:24 +01:00
Removed deprecated event handler
This commit is contained in:
parent
774f5695fb
commit
cfa9de6998
@ -175,23 +175,6 @@ public class PlayerListener extends ModifyworldListener {
|
||||
this.checkPlayerInventory(player);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerInventoryEvent(InventoryClickEvent event) {
|
||||
ItemStack item = event.getCursor();
|
||||
|
||||
if(item == null || item.getType() == Material.AIR || event.getSlotType() != InventoryType.SlotType.QUICKBAR) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player)event.getWhoClicked();
|
||||
|
||||
int targetSlot = player.getInventory().getHeldItemSlot();
|
||||
|
||||
if(event.getSlot() == targetSlot && permissionDenied(player, "modifyworld.items.have", item)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
|
||||
if (this.checkItemUse) {
|
||||
|
Loading…
Reference in New Issue
Block a user