Fix chunk tickets being removed when Citizens is disabled, return correct NPC entity in HologramTrait
This commit is contained in:
parent
7952600382
commit
cdb7cbba4a
|
@ -443,6 +443,8 @@ public class CitizensNavigator implements Navigator, Runnable {
|
|||
}
|
||||
|
||||
private void updateTicket(Location target) {
|
||||
if (!CitizensAPI.hasImplementation() || !CitizensAPI.getPlugin().isEnabled())
|
||||
return;
|
||||
if (target != null && this.activeTicket != null
|
||||
&& new ChunkCoord(target.getChunk()).equals(new ChunkCoord(this.activeTicket.getChunk()))) {
|
||||
this.activeTicket = target.clone();
|
||||
|
|
|
@ -127,7 +127,7 @@ public class HologramTrait extends Trait {
|
|||
* Note: this is implementation-specific and may be removed at a later date.
|
||||
*/
|
||||
public ArmorStand getNameEntity() {
|
||||
return nameNPC != null && nameNPC.isSpawned() ? ((ArmorStand) npc.getEntity()) : null;
|
||||
return nameNPC != null && nameNPC.isSpawned() ? ((ArmorStand) nameNPC.getEntity()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue