mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +01:00
Fixed entities not being removed from viewing list after changing instance
This commit is contained in:
parent
920a16300e
commit
424256dcb6
@ -564,6 +564,7 @@ public class Player extends LivingEntity implements CommandSender {
|
||||
final boolean isLast = counter.get() == length - 1;
|
||||
if (isLast) {
|
||||
// This is the last chunk to be loaded , spawn player
|
||||
this.viewableEntities.forEach(entity -> entity.removeViewer(this));
|
||||
super.setInstance(instance);
|
||||
PlayerSpawnEvent spawnEvent = new PlayerSpawnEvent(instance, firstSpawn);
|
||||
callEvent(PlayerSpawnEvent.class, spawnEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user