mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-25 02:27:41 +01:00
Fix duplication of name hologram
This commit is contained in:
parent
cb676c4b19
commit
ea20cdb21e
@ -268,10 +268,8 @@ public class CitizensNPC extends AbstractNPC {
|
||||
NMS.setHeadYaw(getEntity(), at.getYaw());
|
||||
NMS.setBodyYaw(getEntity(), at.getYaw());
|
||||
|
||||
if (requiresNameHologram() && !hasTrait(HologramTrait.class)) {
|
||||
addTrait(HologramTrait.class);
|
||||
}
|
||||
String nameplateVisible = data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, true).toString();
|
||||
String nameplateVisible = data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, !requiresNameHologram())
|
||||
.toString();
|
||||
getEntity().setCustomNameVisible(Boolean.parseBoolean(nameplateVisible));
|
||||
|
||||
// Set the spawned state
|
||||
@ -318,6 +316,10 @@ public class CitizensNPC extends AbstractNPC {
|
||||
PlayerUpdateTask.registerPlayer(getEntity());
|
||||
}
|
||||
|
||||
if (requiresNameHologram() && !hasTrait(HologramTrait.class)) {
|
||||
addTrait(HologramTrait.class);
|
||||
}
|
||||
|
||||
updateFlyableState();
|
||||
|
||||
Messaging.debug("Spawned", getId(), "SpawnReason." + reason);
|
||||
|
@ -74,6 +74,7 @@ public class CommandTrait extends Trait {
|
||||
economy.withdrawPlayer(player, cost);
|
||||
}
|
||||
} catch (NoClassDefFoundError e) {
|
||||
Messaging.severe("Unable to find Vault when checking command cost - is it installed?");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user