attempt to fix Essentials overriding Skulls (#2356) @kennyrkun

This commit is contained in:
md678685 2019-01-05 18:48:33 +00:00 committed by GitHub
parent 7948e764d4
commit dd41b10522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,6 +728,7 @@ public class EssentialsPlayerListener implements Listener {
} else if (clickedInventory != null && clickedInventory.getType() == InventoryType.PLAYER) {
if (ess.getSettings().isDirectHatAllowed() && event.getClick() == ClickType.LEFT && event.getSlot() == 39
&& event.getCursor().getType() != Material.AIR && event.getCursor().getType().getMaxDurability() == 0
&& !MaterialUtil.isSkull(event.getCursor().getType())
&& ess.getUser(event.getWhoClicked()).isAuthorized("essentials.hat")) {
event.setCancelled(true);
final PlayerInventory inv = (PlayerInventory) clickedInventory;