geforkt von Mirrors/Paper
Purge hidden entities on unload too
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
4f6a5feac8
Commit
6646c417c5
@ -592,11 +592,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onTrackingEnd(Entity entity) {
|
public void onTrackingEnd(Entity entity) {
|
||||||
@@ -1664,6 +1877,7 @@
|
@@ -1664,6 +1877,14 @@
|
||||||
gameeventlistenerregistrar.onListenerRemoved(entity.level);
|
gameeventlistenerregistrar.onListenerRemoved(entity.level);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ entity.valid = false; // CraftBukkit
|
+ // CraftBukkit start
|
||||||
|
+ entity.valid = false;
|
||||||
|
+ if (!(entity instanceof EntityPlayer)) {
|
||||||
|
+ for (EntityPlayer player : players) {
|
||||||
|
+ player.getBukkitEntity().onEntityRemove(entity);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@
|
|||||||
+ if (entityplayer2.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
|
+ if (entityplayer2.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
|
||||||
+ entityplayer2.connection.send(packet);
|
+ entityplayer2.connection.send(packet);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ entityplayer2.getBukkitEntity().removeDisconnectingPlayer(entityplayer.getBukkitEntity());
|
+ entityplayer2.getBukkitEntity().onEntityRemove(entityplayer);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
+ // This removes the scoreboard (and player reference) for the specific player in the manager
|
+ // This removes the scoreboard (and player reference) for the specific player in the manager
|
||||||
|
@ -1154,8 +1154,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeDisconnectingPlayer(Player player) {
|
public void onEntityRemove(Entity entity) {
|
||||||
hiddenEntities.remove(player.getUniqueId());
|
hiddenEntities.remove(entity.getUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren