Skip to content

Commit eddaec1

Browse files
committed
remove hard coded paper material
1 parent 57ec36d commit eddaec1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/java/lol/hyper/toolstats/events/AnvilEvent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

src/main/java/lol/hyper/toolstats/events/PrepareCraft.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)