From 83a4d1b65d1f4f697cea4d19ed135f39da8938f3 Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Mon, 13 Sep 2021 14:42:50 +0100 Subject: [PATCH] Comment to show it's the Material/Netherite slot --- .../listeners/crafting/SmithingTableListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/crafting/SmithingTableListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/crafting/SmithingTableListener.java index 12f78007c..b422f96c9 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/crafting/SmithingTableListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/crafting/SmithingTableListener.java @@ -28,9 +28,10 @@ public class SmithingTableListener implements SlimefunCraftingListener { @EventHandler(ignoreCancelled = true) public void onSmith(InventoryClickEvent e) { if (e.getInventory().getType() == InventoryType.SMITHING && e.getRawSlot() == 2 && e.getWhoClicked() instanceof Player) { - ItemStack itemStack = e.getInventory().getContents()[1]; + ItemStack materialItem = e.getInventory().getContents()[1]; - if (isUnallowed(itemStack)) { + // Checks if the Item in the Material/Netherite slot is allowed to be used. + if (isUnallowed(materialItem)) { e.setResult(Result.DENY); Slimefun.getLocalization().sendMessage(e.getWhoClicked(), "smithing_table.not-working", true); }