mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Clear the old tracker before replacing it
This commit is contained in:
parent
a551fe4890
commit
0acda96bff
@ -1077,6 +1077,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTrackerEntry entry = server.getTracker().trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTrackerEntry replace = new PlayerlistTrackerEntry(entry);
|
||||
server.getTracker().trackedEntities.a(entity.getEntityId(), replace);
|
||||
if (TRACKED_ENTITY_SET != null) {
|
||||
|
@ -1130,6 +1130,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTrackerEntry entry = server.getTracker().trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTrackerEntry replace = new PlayerlistTrackerEntry(entry);
|
||||
server.getTracker().trackedEntities.a(entity.getEntityId(), replace);
|
||||
if (TRACKED_ENTITY_SET != null) {
|
||||
|
@ -1137,6 +1137,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTrackerEntry entry = server.getTracker().trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTrackerEntry replace = new PlayerlistTrackerEntry(entry);
|
||||
server.getTracker().trackedEntities.a(entity.getEntityId(), replace);
|
||||
if (TRACKED_ENTITY_SET != null) {
|
||||
|
@ -1179,6 +1179,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTrackerEntry entry = server.getTracker().trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTrackerEntry replace = new PlayerlistTrackerEntry(entry);
|
||||
server.getTracker().trackedEntities.a(entity.getEntityId(), replace);
|
||||
if (TRACKED_ENTITY_SET != null) {
|
||||
|
@ -1206,6 +1206,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTracker entry = server.getChunkProvider().playerChunkMap.trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry);
|
||||
server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace);
|
||||
if (getHandle(entity) instanceof EntityHumanNPC) {
|
||||
|
@ -1223,6 +1223,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTracker entry = server.getChunkProvider().playerChunkMap.trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry);
|
||||
server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace);
|
||||
if (getHandle(entity) instanceof EntityHumanNPC) {
|
||||
|
@ -1260,6 +1260,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTracker entry = server.getChunkProvider().playerChunkMap.trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry);
|
||||
server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace);
|
||||
if (getHandle(entity) instanceof EntityHumanNPC) {
|
||||
|
@ -1242,6 +1242,7 @@ public class NMSImpl implements NMSBridge {
|
||||
TrackedEntity entry = server.getChunkProvider().chunkMap.G.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.broadcastRemoved();
|
||||
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().chunkMap, entry);
|
||||
server.getChunkProvider().chunkMap.G.put(entity.getEntityId(), replace);
|
||||
if (getHandle(entity) instanceof EntityHumanNPC) {
|
||||
|
@ -1250,6 +1250,7 @@ public class NMSImpl implements NMSBridge {
|
||||
TrackedEntity entry = server.getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.broadcastRemoved();
|
||||
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkSource().chunkMap, entry);
|
||||
server.getChunkSource().chunkMap.entityMap.put(entity.getEntityId(), replace);
|
||||
if (getHandle(entity) instanceof EntityHumanNPC) {
|
||||
|
@ -1349,6 +1349,7 @@ public class NMSImpl implements NMSBridge {
|
||||
TrackedEntity entry = server.getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.broadcastRemoved();
|
||||
CitizensEntityTracker replace = new CitizensEntityTracker(server.getChunkSource().chunkMap, entry);
|
||||
server.getChunkSource().chunkMap.entityMap.put(entity.getEntityId(), replace);
|
||||
}
|
||||
|
@ -1348,6 +1348,7 @@ public class NMSImpl implements NMSBridge {
|
||||
TrackedEntity entry = server.getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.broadcastRemoved();
|
||||
CitizensEntityTracker replace = new CitizensEntityTracker(server.getChunkSource().chunkMap, entry);
|
||||
server.getChunkSource().chunkMap.entityMap.put(entity.getEntityId(), replace);
|
||||
}
|
||||
|
@ -998,6 +998,7 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityTrackerEntry entry = server.getTracker().trackedEntities.get(entity.getEntityId());
|
||||
if (entry == null)
|
||||
return;
|
||||
entry.a();
|
||||
PlayerlistTrackerEntry replace = new PlayerlistTrackerEntry(entry);
|
||||
server.getTracker().trackedEntities.a(entity.getEntityId(), replace);
|
||||
if (TRACKED_ENTITY_SET != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user