mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 00:30:07 +01:00
Fix ClassCastException
This commit is contained in:
parent
1337c45f1d
commit
8ccaf3caf2
@ -57,7 +57,7 @@ public class InventoryListener implements Listener{
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onFurnaceBurnEvent(FurnaceBurnEvent event) {
|
||||
Block furnaceBlock = event.getBlock();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock).getInventory();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock.getState()).getInventory();
|
||||
|
||||
if (plugin.furnaceIsTracked(furnaceBlock) && ItemChecks.isSmeltable(inventory.getSmelting())) {
|
||||
SmeltingManager smeltingManager = new SmeltingManager(plugin.getFurnacePlayer(furnaceBlock));
|
||||
@ -68,7 +68,7 @@ public class InventoryListener implements Listener{
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onFurnaceSmeltEvent(FurnaceSmeltEvent event) {
|
||||
Block furnaceBlock = event.getBlock();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock).getInventory();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock.getState()).getInventory();
|
||||
|
||||
if (plugin.furnaceIsTracked(furnaceBlock) && ItemChecks.isSmeltable(inventory.getSmelting())) {
|
||||
SmeltingManager smeltingManager = new SmeltingManager(plugin.getFurnacePlayer(furnaceBlock));
|
||||
@ -79,7 +79,7 @@ public class InventoryListener implements Listener{
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onFurnaceExtractEvent(FurnaceExtractEvent event) {
|
||||
Block furnaceBlock = event.getBlock();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock).getInventory();
|
||||
FurnaceInventory inventory = ((Furnace)furnaceBlock.getState()).getInventory();
|
||||
|
||||
if (plugin.furnaceIsTracked(furnaceBlock) && ItemChecks.isSmeltable(inventory.getSmelting())) {
|
||||
SmeltingManager smeltingManager = new SmeltingManager(plugin.getFurnacePlayer(furnaceBlock));
|
||||
|
Loading…
Reference in New Issue
Block a user