mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
Fire VehicleEnterEvent for loaded chunks only. Fixes BUKKIT-3831
This commit is contained in:
parent
3ad423af07
commit
b10474253c
1 changed files with 1 additions and 1 deletions
|
@ -1432,7 +1432,7 @@ public abstract class Entity {
|
|||
this.vehicle = null;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle)) {
|
||||
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4)) {
|
||||
VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.bukkitEntity);
|
||||
pluginManager.callEvent(event);
|
||||
|
||||
|
|
Loading…
Reference in a new issue