mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-14 14:45:43 +01:00
Closes: #57
This commit is contained in:
parent
aa89e64256
commit
151eebff1a
@ -23,13 +23,14 @@ public class JeffChestSortAdditionalHotkeyListener implements Listener {
|
||||
if(!(e.getWhoClicked() instanceof Player)) {
|
||||
return;
|
||||
}
|
||||
Player p = (Player) e.getWhoClicked();
|
||||
// Only continue if clicked outside of the chest
|
||||
if(e.getClickedInventory()!=null) {
|
||||
return;
|
||||
}
|
||||
// Possible fix for #57
|
||||
if(e.getInventory().getHolder()==null) return;
|
||||
if(!(e.getInventory().getHolder() instanceof Block)) return;
|
||||
if(e.getInventory().getHolder() == p && e.getInventory() != p.getInventory()) return;
|
||||
// End Possible fix for #57
|
||||
if(e.getInventory().getType() != InventoryType.CHEST
|
||||
&& e.getInventory().getType() != InventoryType.DISPENSER
|
||||
@ -40,8 +41,6 @@ public class JeffChestSortAdditionalHotkeyListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
Player p = (Player) e.getWhoClicked();
|
||||
|
||||
if(!p.hasPermission("chestsort.use")) return;
|
||||
|
||||
plugin.registerPlayerIfNeeded(p);
|
||||
|
Loading…
Reference in New Issue
Block a user