mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-23 00:21:31 +01:00
QoL change for /npc glowing --color to enable if not previously enabled
This commit is contained in:
parent
5e431462e0
commit
4bbe797120
@ -640,6 +640,9 @@ public class NPCCommands {
|
||||
if (!(npc.getEntity() instanceof Player))
|
||||
throw new CommandException(Messages.GLOWING_COLOR_PLAYER_ONLY);
|
||||
npc.getTrait(ScoreboardTrait.class).setColor(chatColor);
|
||||
if (!npc.data().has(NPC.GLOWING_METADATA)) {
|
||||
npc.data().setPersistent(NPC.GLOWING_METADATA, true);
|
||||
}
|
||||
Messaging.sendTr(sender, Messages.GLOWING_COLOR_SET, npc.getName(),
|
||||
chatColor == null ? ChatColor.WHITE + "white" : chatColor + Util.prettyEnum(chatColor));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user