diff options
author | Tamion <[email protected]> | 2024-07-21 12:33:37 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-21 12:33:37 +0200 |
commit | aa36ae65764f652a16517a994e8d9cf4a89136c8 (patch) | |
tree | 17729c0482d2913ee08076ed473f2ab4e58f75c9 | |
parent | 3a47518b4bc5252d1204c7ee59098f6b4d247290 (diff) | |
download | Paper-aa36ae65764f652a16517a994e8d9cf4a89136c8.tar.gz Paper-aa36ae65764f652a16517a994e8d9cf4a89136c8.zip |
Fix EntityUnleashEvent cancellation on distance cause (#11131)
-rw-r--r-- | patches/server/0485-Expand-EntityUnleashEvent.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0485-Expand-EntityUnleashEvent.patch b/patches/server/0485-Expand-EntityUnleashEvent.patch index 9d1492dda4..8f17766d83 100644 --- a/patches/server/0485-Expand-EntityUnleashEvent.patch +++ b/patches/server/0485-Expand-EntityUnleashEvent.patch @@ -41,7 +41,7 @@ index a46b7e09809937b6e09bc3e08760d34f6eb00c4d..e884f37137799c85e5acc410ae589636 } diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java -index 30d7dd9646ba9d6a9396dc140a61eb2cac07dfc6..674713a611e709542990f748027bdc5b800d6650 100644 +index 30d7dd9646ba9d6a9396dc140a61eb2cac07dfc6..bc03f1fe2a311bf61449879751360c6775dde6ac 100644 --- a/src/main/java/net/minecraft/world/entity/Leashable.java +++ b/src/main/java/net/minecraft/world/entity/Leashable.java @@ -166,8 +166,11 @@ public interface Leashable { @@ -67,8 +67,8 @@ index 30d7dd9646ba9d6a9396dc140a61eb2cac07dfc6..674713a611e709542990f748027bdc5b - 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 |