mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-06-26 14:35:03 +02:00
Ensure /npc skin works while not spawned
This commit is contained in:
parent
80011eed41
commit
93af872e93
|
@ -1721,13 +1721,7 @@ public class NPCCommands {
|
|||
skinName = args.getString(1);
|
||||
}
|
||||
Messaging.sendTr(sender, Messages.SKIN_SET, npc.getName(), skinName);
|
||||
if (npc.isSpawned()) {
|
||||
SkinnableEntity skinnable = npc.getEntity() instanceof SkinnableEntity ? (SkinnableEntity) npc.getEntity()
|
||||
: null;
|
||||
if (skinnable != null) {
|
||||
skinnable.setSkinName(skinName, true);
|
||||
}
|
||||
}
|
||||
trait.setSkinName(skinName, true);
|
||||
}
|
||||
|
||||
@Command(
|
||||
|
|
Loading…
Reference in New Issue
Block a user