Update /npc metadata remove message

This commit is contained in:
fullwall 2022-07-23 02:01:57 +08:00
parent a90c319563
commit d5db707d58
2 changed files with 10 additions and 9 deletions

View File

@ -255,7 +255,7 @@ public class ShopTrait extends Trait {
consumer.accept(original);
}
@MenuSlot(slot = { 0, 3 }, material = Material.BOOK, amount = 1, title = "Set description")
@MenuSlot(slot = { 1, 5 }, material = Material.BOOK, amount = 1, title = "Set description")
public void onEditDescription(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
event.setCancelled(true);
if (modified.display == null)
@ -268,7 +268,7 @@ public class ShopTrait extends Trait {
}));
}
@MenuSlot(slot = { 0, 5 }, material = Material.FEATHER, amount = 1, title = "Set name")
@MenuSlot(slot = { 1, 3 }, material = Material.FEATHER, amount = 1, title = "Set name")
public void onEditName(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
event.setCancelled(true);
if (modified.display == null)
@ -375,6 +375,13 @@ public class ShopTrait extends Trait {
@Override
public void initialise(MenuContext ctx) {
this.ctx = ctx;
if (shop.pages.size() > 0) {
ctx.getSlot(8).setItemStack(new ItemStack(Material.CHEST, 1), "Open shop");
ctx.getSlot(8).addClickHandler(evt -> {
evt.setCancelled(true);
ctx.getMenu().transition(new NPCShopViewer(shop));
});
}
}
@MenuSlot(slot = { 0, 4 }, material = Material.FEATHER, amount = 1, title = "Edit shop items")
@ -383,12 +390,6 @@ public class ShopTrait extends Trait {
ctx.getMenu().transition(new NPCShopContentsEditor(shop));
}
@MenuSlot(slot = { 0, 8 }, material = Material.CHEST, amount = 1, title = "Open shop")
public void onOpenShop(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
event.setCancelled(true);
ctx.getMenu().transition(new NPCShopViewer(shop));
}
@MenuSlot(slot = { 0, 2 }, material = Material.OAK_SIGN, amount = 1, title = "Edit shop permission")
public void onPermissionChange(InventoryMenuSlot slot, CitizensInventoryClickEvent event) {
event.setCancelled(true);

View File

@ -143,7 +143,7 @@ citizens.commands.npc.lookclose.error-random-range=Invalid range [[{0}]]. Use th
citizens.commands.npc.lookclose.set=[[{0}]] will now rotate when players are nearby.
citizens.commands.npc.lookclose.stopped=[[{0}]] will no longer rotate when players are nearby.
citizens.commands.npc.metadata.set=[[{0}]] set to [[{1}]].
citizens.commands.npc.metadata.unset=Removed [[{{0}}]] from [[{1}]].
citizens.commands.npc.metadata.unset=Removed [[{0}]] from [[{1}]].
citizens.commands.npc.minecart.set=[[{0}]] now has item [[{1}]]:[[{2}]] with offset [[{3}]].
citizens.commands.npc.mount.failed=Couldn''t mount [[{0}]].
citizens.commands.npc.mount.must-be-spawned=Couldn''t mount [[{0}]]. Make sure that the destination NPC ID is correct and it is spawned.