mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Fix EntityUnleashEvent cancellation on distance cause (#11131)
This commit is contained in:
parent
e09fea294f
commit
cb5526fec2
1 changed files with 1 additions and 1 deletions
|
@ -67,8 +67,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- entity.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(entity.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE));
|
||||
+ // Paper start - Expand EntityUnleashEvent
|
||||
+ final EntityUnleashEvent event = new EntityUnleashEvent(entity.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
|
||||
+ if (!event.callEvent()) return;
|
||||
+ dropLeash = event.isDropLeash();
|
||||
+ event.callEvent();
|
||||
+ // Paper end - Expand EntityUnleashEvent
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
Loading…
Reference in a new issue