mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Null check
This commit is contained in:
parent
8ccaf3caf2
commit
a8b5b438bf
@ -81,7 +81,7 @@ public class InventoryListener implements Listener{
|
|||||||
Block furnaceBlock = event.getBlock();
|
Block furnaceBlock = event.getBlock();
|
||||||
FurnaceInventory inventory = ((Furnace)furnaceBlock.getState()).getInventory();
|
FurnaceInventory inventory = ((Furnace)furnaceBlock.getState()).getInventory();
|
||||||
|
|
||||||
if (plugin.furnaceIsTracked(furnaceBlock) && ItemChecks.isSmeltable(inventory.getSmelting())) {
|
if (plugin.furnaceIsTracked(furnaceBlock) && inventory.getSmelting() != null && ItemChecks.isSmeltable(inventory.getSmelting())) {
|
||||||
SmeltingManager smeltingManager = new SmeltingManager(plugin.getFurnacePlayer(furnaceBlock));
|
SmeltingManager smeltingManager = new SmeltingManager(plugin.getFurnacePlayer(furnaceBlock));
|
||||||
smeltingManager.vanillaXPBoost(event);
|
smeltingManager.vanillaXPBoost(event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user