mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-22 11:55:12 +01:00
properly check for name spaced keys
This commit is contained in:
parent
565f0295c9
commit
78c98d3c91
@ -118,14 +118,13 @@ public class ExpiredMenu extends Holder {
|
||||
|
||||
final PersistentDataContainerView container = itemStack.getPersistentDataContainer();
|
||||
|
||||
if (!container.has(Keys.auction_button.getNamespacedKey())) return;
|
||||
final Player player = (Player) event.getWhoClicked();
|
||||
|
||||
if (container.has(Keys.auction_button.getNamespacedKey())) {
|
||||
final String type = container.getOrDefault(Keys.auction_button.getNamespacedKey(), PersistentDataType.STRING, "");
|
||||
|
||||
if (type.isEmpty()) return;
|
||||
|
||||
final Player player = (Player) event.getWhoClicked();
|
||||
|
||||
switch (type) {
|
||||
case "Back" -> {
|
||||
menu.click(player);
|
||||
@ -215,6 +214,7 @@ public class ExpiredMenu extends Holder {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Methods.isInvFull(player)) { // run this here obviously as well
|
||||
player.sendMessage(Messages.INVENTORY_FULL.getMessage(player));
|
||||
|
Loading…
Reference in New Issue
Block a user