mirror of
https://github.com/songoda/EpicFurnaces.git
synced 2024-11-27 20:35:24 +01:00
Fixes a NullPointerException in InventoryListeners#onInventoryClick
This commit is contained in:
parent
a623b41f98
commit
208c4fc6d6
@ -41,7 +41,7 @@ public class InventoryListeners implements Listener {
|
||||
if (event.getSlot() != 64537) {
|
||||
if (event.getInventory().getType() == InventoryType.ANVIL) {
|
||||
if (event.getAction() != InventoryAction.NOTHING) {
|
||||
if (event.getCurrentItem().getType() != Material.AIR) {
|
||||
if (event.getCurrentItem() != null && event.getCurrentItem().getType() != Material.AIR) {
|
||||
ItemStack item = event.getCurrentItem();
|
||||
if (item.getType().name().contains("FURNACE") && !item.getType().name().contains("SMOKER")) {
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user