mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-21 11:26:13 +01:00
parent
afba9cdbcd
commit
712e4cea66
@ -180,11 +180,9 @@ public class PlayerListener extends ModifyworldListener {
|
||||
public void onPlayerInventoryClick(InventoryClickEvent event) {
|
||||
InventoryHolder holder = event.getInventory().getHolder();
|
||||
|
||||
if (holder instanceof Player) { // do not track inter-inventory stuff
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getRawSlot() >= event.getView().getTopInventory().getSize()) { // top inventory only
|
||||
if (holder instanceof Player || // do not track inter-inventory stuff
|
||||
event.getRawSlot() >= event.getView().getTopInventory().getSize() || // top inventory only
|
||||
event.getSlotType() != InventoryType.SlotType.OUTSIDE) { // do not track drop
|
||||
return;
|
||||
}
|
||||
|
||||
@ -194,7 +192,7 @@ public class PlayerListener extends ModifyworldListener {
|
||||
String op;
|
||||
ItemStack item;
|
||||
|
||||
if(take == null) {
|
||||
if (take == null) {
|
||||
action = "put";
|
||||
item = event.getCursor();
|
||||
} else {
|
||||
@ -204,7 +202,7 @@ public class PlayerListener extends ModifyworldListener {
|
||||
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
|
||||
if(permissionDenied(player, "modifyworld.items", action, item, "of", holder)) {
|
||||
if (permissionDenied(player, "modifyworld.items", action, item, "of", holder)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user