don't let the player use multiple tokens at once

This commit is contained in:
hyperdefined
2025-01-26 13:15:39 -05:00
parent b8ac32f9b4
commit dd584fd2b8

View File

@@ -69,12 +69,17 @@ public class AnvilEvent implements Listener {
return; return;
} }
//get the type from the token // get the type from the token
String tokenType = secondSlotContainer.get(toolStats.tokenType, PersistentDataType.STRING); String tokenType = secondSlotContainer.get(toolStats.tokenType, PersistentDataType.STRING);
if (tokenType == null) { if (tokenType == null) {
return; return;
} }
// don't let the player use more than one
if (secondSlot.getAmount() > 1) {
return;
}
// clone the item // clone the item
ItemStack clone = firstSlot.clone(); ItemStack clone = firstSlot.clone();