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);
|
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)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
|
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
|
||||||
if (this.checkItemUse) {
|
if (this.checkItemUse) {
|
||||||
|
Loading…
Reference in New Issue
Block a user