diff --git a/main/src/main/java/net/citizensnpcs/trait/ShopTrait.java b/main/src/main/java/net/citizensnpcs/trait/ShopTrait.java index 5b7bc0d01..b81c9b7f4 100644 --- a/main/src/main/java/net/citizensnpcs/trait/ShopTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/ShopTrait.java @@ -85,6 +85,11 @@ public class ShopTrait extends Trait { return shops.globalShops.computeIfAbsent(name, (s) -> new NPCShop(s)); } + @Override + public void onRemove() { + deleteShop(npc.getUniqueId().toString()); + } + public void onRightClick(Player player) { if (rightClickShop == null) return; @@ -608,6 +613,7 @@ public class ShopTrait extends Trait { item.onClick(shop, evt); }); } + InventoryMenuSlot prev = ctx.getSlot(4 * 9 + 3); InventoryMenuSlot next = ctx.getSlot(4 * 9 + 5); prev.clear();