Nicer output for --trait

This commit is contained in:
fullwall 2012-08-28 19:38:11 +08:00
parent d0c01d874d
commit a226a7bff2

View File

@ -206,11 +206,11 @@ public class NPCCommands {
Iterable<String> parts = Splitter.on(",").trimResults().split(args.getFlag("trait"));
for (String tr : parts) {
Class<? extends Trait> 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")) {