diff --git a/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java b/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java index 501e4c4..32a7c23 100644 --- a/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java +++ b/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java @@ -53,7 +53,7 @@ public class Furnace { public void plus(FurnaceSmeltEvent e) { Block block = location.getBlock(); - if (!block.getType().name().contains("FURNACE")) return; + if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return; this.uses++; this.tolevel++; @@ -180,7 +180,7 @@ public class Furnace { public void updateCook() { Block block = location.getBlock(); - if (!block.getType().name().contains("FURNACE")) return; + if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return; Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> { int num = getPerformanceTotal(); diff --git a/src/main/java/com/songoda/epicfurnaces/listeners/BlockListeners.java b/src/main/java/com/songoda/epicfurnaces/listeners/BlockListeners.java index 5f50203..87c55c6 100644 --- a/src/main/java/com/songoda/epicfurnaces/listeners/BlockListeners.java +++ b/src/main/java/com/songoda/epicfurnaces/listeners/BlockListeners.java @@ -48,7 +48,7 @@ public class BlockListeners implements Listener { public void onBlockPlace(BlockPlaceEvent event) { if (plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld()) - || !event.getBlock().getType().name().contains("FURNACE")) + || !event.getBlock().getType().name().contains("FURNACE") && !event.getBlock().getType().name().contains("SMOKER")) return; ItemStack item = event.getItemInHand(); @@ -73,7 +73,7 @@ public class BlockListeners implements Listener { return; } Block block = event.getBlock(); - if (!block.getType().name().contains("FURNACE") + if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER") || plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld())) return; diff --git a/src/main/java/com/songoda/epicfurnaces/listeners/InteractListeners.java b/src/main/java/com/songoda/epicfurnaces/listeners/InteractListeners.java index 503ca6d..5b6cc2f 100644 --- a/src/main/java/com/songoda/epicfurnaces/listeners/InteractListeners.java +++ b/src/main/java/com/songoda/epicfurnaces/listeners/InteractListeners.java @@ -33,7 +33,7 @@ public class InteractListeners implements Listener { } Player player = event.getPlayer(); if (event.getAction() != Action.LEFT_CLICK_BLOCK - || (!block.getType().name().contains("FURNACE")) + || !block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER") || player.isSneaking() || player.getInventory().getItemInHand().getType().name().contains("PICKAXE") || !player.hasPermission("EpicFurnaces.overview")) { diff --git a/src/main/java/com/songoda/epicfurnaces/listeners/InventoryListeners.java b/src/main/java/com/songoda/epicfurnaces/listeners/InventoryListeners.java index 16537d6..e141752 100644 --- a/src/main/java/com/songoda/epicfurnaces/listeners/InventoryListeners.java +++ b/src/main/java/com/songoda/epicfurnaces/listeners/InventoryListeners.java @@ -38,7 +38,7 @@ public class InventoryListeners implements Listener { if (event.getAction() != InventoryAction.NOTHING) { if (event.getCurrentItem().getType() != Material.AIR) { ItemStack item = event.getCurrentItem(); - if (item.getType().name().contains("FURNACE")) { + if (item.getType().name().contains("FURNACE") && !item.getType().name().contains("SMOKER")) { event.setCancelled(true); } } diff --git a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java index 1fe570f..8ae44d2 100644 --- a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java +++ b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java @@ -105,7 +105,7 @@ public class FurnaceTask extends BukkitRunnable { Block block = location.getBlock(); - if (!block.getType().name().contains("FURNACE")) continue; + if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) continue; Furnace furnace1 = plugin.getFurnaceManager().getFurnace(block); if (furnace == furnace1) continue; org.bukkit.block.Furnace furnaceBlock = ((org.bukkit.block.Furnace) block.getState());