mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Remove shop on trait remove
This commit is contained in:
parent
97c2417c49
commit
6533cdccf8
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user