Skip to content

Commit

Permalink
Fix chunk tickets being removed when Citizens is disabled, return cor…
Browse files Browse the repository at this point in the history
…rect NPC entity in HologramTrait
  • Loading branch information
fullwall committed Sep 17, 2021
1 parent 7952600 commit cdb7cbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ private boolean updateStationaryStatus() {
}

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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private double getMaxHeight() {
* 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
Expand Down

0 comments on commit cdb7cbb

Please sign in to comment.