Mob NPCs have names
This commit is contained in:
parent
1b3e3e995c
commit
8d1162059a
|
@ -389,8 +389,9 @@ public class NPCCommands {
|
|||
throw new CommandException(Messages.INVALID_SPAWN_LOCATION);
|
||||
}
|
||||
|
||||
if (!args.hasFlag('u'))
|
||||
if (!args.hasFlag('u')) {
|
||||
npc.spawn(spawnLoc);
|
||||
}
|
||||
|
||||
if (args.hasValueFlag("trait")) {
|
||||
Iterable<String> parts = Splitter.on(',').trimResults().split(args.getFlag("trait"));
|
||||
|
|
|
@ -198,6 +198,7 @@ public class CitizensNPC extends AbstractNPC {
|
|||
for (Trait trait : traits.values())
|
||||
trait.onSpawn();
|
||||
getBukkitEntity().setRemoveWhenFarAway(false);
|
||||
getBukkitEntity().setCustomName(getFullName());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue