diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index 2e1ae5f03..abf55a2ec 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -206,11 +206,11 @@ public class NPCCommands { Iterable parts = Splitter.on(",").trimResults().split(args.getFlag("trait")); for (String tr : parts) { Class clazz = CitizensAPI.getTraitFactory().getTraitClass(tr); - if (clazz != null) { - npc.addTrait(clazz); - } + if (clazz == null) + continue; + npc.addTrait(clazz); + msg += StringHelper.wrap(tr) + ", "; } - msg += " with the specified traits"; } if (args.hasValueFlag("b")) {