mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Fix EntityUnleashEvent cancellation on distance cause (#11131)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user