mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Remove passengers in Entity#remove
This commit is contained in:
parent
fb23b4bc27
commit
184140e341
@ -1506,6 +1506,10 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
|
||||
if (isRemoved())
|
||||
return;
|
||||
|
||||
// Remove passengers if any (also done with LivingEntity#kill)
|
||||
if (hasPassenger()) {
|
||||
getPassengers().forEach(this::removePassenger);
|
||||
}
|
||||
MinecraftServer.getUpdateManager().getThreadProvider().removeEntity(this);
|
||||
this.removed = true;
|
||||
this.shouldRemove = true;
|
||||
|
Loading…
Reference in New Issue
Block a user