mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-10 21:02:36 +01:00
Add /npc shop show [name] (playername)
This commit is contained in:
parent
2fcdeec49e
commit
757691261c
@ -2921,6 +2921,11 @@ public class NPCCommands {
|
||||
NPCShop copy = PersistenceLoader.load(NPCShop.class, key);
|
||||
npc.getOrAddTrait(ShopTrait.class).setDefaultShop(copy);
|
||||
} else if (action.equalsIgnoreCase("show")) {
|
||||
if (args.argsLength() == 4) {
|
||||
sender = Bukkit.getPlayer(args.getString(3));
|
||||
if (sender == null)
|
||||
throw new CommandException(Messages.SHOP_PLAYER_NOT_FOUND, args.getString(3));
|
||||
}
|
||||
shop.display(sender);
|
||||
} else
|
||||
throw new CommandUsageException();
|
||||
|
@ -356,7 +356,6 @@ public class Messages {
|
||||
public static final String PICKUP_ITEMS_UNSET = "citizens.commands.npc.pickupitems.unset";
|
||||
public static final String PIGLIN_DANCING_SET = "citizens.commands.npc.piglin.dancing-set";
|
||||
public static final String PIGLIN_DANCING_UNSET = "citizens.commands.npc.piglin.dancing-unset";
|
||||
public static final String PLAYER_NOT_FOUND_FOR_SPAWN = "citizens.commands.npc.create.no-player-for-spawn";
|
||||
public static final String PLAYERFILTER_ALLOWLIST_SET = "citizens.commands.npc.playerfilter.allowlist-set";
|
||||
public static final String PLAYERFILTER_APPLYRANGE_SET = "citizens.commands.npc.playerfilter.applyrange-set";
|
||||
public static final String PLAYERFILTER_CLEARED = "citizens.commands.npc.playerfilter.cleared";
|
||||
@ -389,6 +388,7 @@ public class Messages {
|
||||
public static final String SHEARED_STOPPED = "citizens.editors.equipment.sheared-stopped";
|
||||
public static final String SHEEP_COLOR_SET = "citizens.commands.npc.sheep.color-set";
|
||||
public static final String SHOP_DELETED = "citizens.commands.npc.shop.deleted";
|
||||
public static final String SHOP_PLAYER_NOT_FOUND = "citizens.commands.npc.shop.show-player-not-found";
|
||||
public static final String SHULKER_COLOR_SET = "citizens.commands.npc.shulker.color-set";
|
||||
public static final String SHULKER_PEEK_SET = "citizens.commands.npc.shulker.peek-set";
|
||||
public static final String SITTING_SET = "citizens.commands.npc.sitting.set";
|
||||
|
@ -497,6 +497,7 @@
|
||||
"citizens.commands.npc.shop.deleted" : "Shop [[{0}]] deleted.",
|
||||
"citizens.commands.npc.shop.description" : "NPC shop edit/show",
|
||||
"citizens.commands.npc.shop.help" : "",
|
||||
"citizens.commands.npc.shop.show-player-not-found" : "Player [[{0}]] not online to show shop.",
|
||||
"citizens.commands.npc.shulker.color-set" : "[[{0}]]''s color set to [[{1}]].",
|
||||
"citizens.commands.npc.shulker.description" : "Sets shulker modifiers",
|
||||
"citizens.commands.npc.shulker.help" : "",
|
||||
|
Loading…
Reference in New Issue
Block a user