mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Apply suggestions from code review
Co-authored-by: Daniel Walsh <walshydev@gmail.com>
This commit is contained in:
parent
13db44011b
commit
20beabcc3b
@ -18,7 +18,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
|
|||||||
* cartography table.
|
* cartography table.
|
||||||
*
|
*
|
||||||
* @author Sefiraat
|
* @author Sefiraat
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class SmithingTableListener implements SlimefunCraftingListener {
|
public class SmithingTableListener implements SlimefunCraftingListener {
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ public class SmithingTableListener implements SlimefunCraftingListener {
|
|||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onSmith(InventoryClickEvent e) {
|
public void onSmith(InventoryClickEvent e) {
|
||||||
if (e.getRawSlot() == 2 && e.getWhoClicked() instanceof Player && e.getInventory().getType() == InventoryType.SMITHING) {
|
if (e.getInventory().getType() == InventoryType.SMITHING && e.getRawSlot() == 2 && e.getWhoClicked() instanceof Player &&) {
|
||||||
ItemStack itemStack = e.getInventory().getContents()[1];
|
ItemStack itemStack = e.getInventory().getContents()[1];
|
||||||
|
|
||||||
if (isUnallowed(itemStack)) {
|
if (isUnallowed(itemStack)) {
|
||||||
@ -36,7 +35,5 @@ public class SmithingTableListener implements SlimefunCraftingListener {
|
|||||||
Slimefun.getLocalization().sendMessage(e.getWhoClicked(), "smithing_table.not-working", true);
|
Slimefun.getLocalization().sendMessage(e.getWhoClicked(), "smithing_table.not-working", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user