File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/main/java/lol/hyper/toolstats/events Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ public void onAnvilEvent(PrepareAnvilEvent event) {
5757 }
5858
5959 Material firstSlotMaterial = firstSlot .getType ();
60- Material secondSlotMaterial = secondSlot .getType ();
6160
6261 // make sure the first item is a valid item
6362 if (!toolStats .itemChecker .isValidItem (firstSlotMaterial )) {
@@ -67,7 +66,7 @@ public void onAnvilEvent(PrepareAnvilEvent event) {
6766 PersistentDataContainer secondSlotContainer = secondSlot .getItemMeta ().getPersistentDataContainer ();
6867
6968 // make sure the 2nd item is one of ours
70- if (secondSlotMaterial != Material . PAPER || !secondSlotContainer .has (toolStats .tokenType , PersistentDataType .STRING )) {
69+ if (!secondSlotContainer .has (toolStats .tokenType , PersistentDataType .STRING )) {
7170 return ;
7271 }
7372
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public void onCraft(PrepareItemCraftEvent event) {
4040 // get the items in the crafting grid
4141 ItemStack [] grid = event .getInventory ().getMatrix ();
4242 for (ItemStack item : grid ) {
43- if (item == null || item . getType () != Material . PAPER ) {
43+ if (item == null ) {
4444 continue ;
4545 }
4646 ItemMeta meta = item .getItemMeta ();
You can’t perform that action at this time.
0 commit comments