mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-13 06:07:26 +01:00
Nicer output for --trait
This commit is contained in:
parent
d0c01d874d
commit
a226a7bff2
@ -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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user