mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
don't let the player use multiple tokens at once
This commit is contained in:
@@ -69,12 +69,17 @@ public class AnvilEvent implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
//get the type from the token
|
||||
// get the type from the token
|
||||
String tokenType = secondSlotContainer.get(toolStats.tokenType, PersistentDataType.STRING);
|
||||
if (tokenType == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// don't let the player use more than one
|
||||
if (secondSlot.getAmount() > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// clone the item
|
||||
ItemStack clone = firstSlot.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user