mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Comment to show it's the Material/Netherite slot
This commit is contained in:
parent
153f33a72b
commit
83a4d1b65d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user