Skip to content

Commit

Permalink
Edit /npc skin -t
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 18, 2018
1 parent f4d5f02 commit 2b422c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main/src/main/java/net/citizensnpcs/commands/NPCCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -1459,11 +1459,11 @@ public void sheep(CommandContext args, CommandSender sender, NPC npc) throws Com

@Command(
aliases = { "npc" },
usage = "skin (-c -l(atest)) [name] (or -t [data] [signature])",
usage = "skin (-c -l(atest)) [name] (or -t [uuid] [data] [signature])",
desc = "Sets an NPC's skin name. Use -l to set the skin to always update to the latest",
modifiers = { "skin" },
min = 1,
max = 3,
max = 4,
flags = "ctl",
permission = "citizens.npc.skin")
@Requirements(types = EntityType.PLAYER, selected = true, ownership = true)
Expand All @@ -1472,14 +1472,14 @@ public void skin(final CommandContext args, final CommandSender sender, final NP
if (args.hasFlag('c')) {
npc.data().remove(NPC.PLAYER_SKIN_UUID_METADATA);
} else if (args.hasFlag('t')) {
if (args.argsLength() != 3)
if (args.argsLength() != 4)
throw new CommandException(Messages.SKIN_REQUIRED);
SkinnableEntity skinnable = npc.getEntity() instanceof SkinnableEntity ? (SkinnableEntity) npc.getEntity()
: null;
if (skinnable == null) {
throw new CommandException("Must be spawned.");
}
skinnable.setSkinPersistent(skinName, args.getString(1), args.getString(2));
skinnable.setSkinPersistent(args.getString(1), args.getString(2), args.getString(3));
Messaging.sendTr(sender, Messages.SKIN_SET, npc.getName(), args.getString(1));
return;
} else {
Expand Down

0 comments on commit 2b422c1

Please sign in to comment.