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