mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Mob NPCs have names
This commit is contained in:
parent
6a7744859b
commit
d8e7c79c89
@ -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
Block a user