diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java index e0e068799a..95248d0f5c 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java @@ -6,11 +6,20 @@ import org.jetbrains.annotations.NotNull; /** * Called immediately prior to an entity being unleashed. + *

+ * Cancelling this event when either: + *

+ * will have no effect. */ -public class EntityUnleashEvent extends EntityEvent { +public class EntityUnleashEvent extends EntityEvent implements org.bukkit.event.Cancellable { // Paper private static final HandlerList handlers = new HandlerList(); private final UnleashReason reason; private boolean dropLeash; // Paper + private boolean cancelled; // Paper // Paper start - drop leash variable @Deprecated @@ -53,6 +62,16 @@ public class EntityUnleashEvent extends EntityEvent { public void setDropLeash(boolean dropLeash) { this.dropLeash = dropLeash; } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } // Paper end @NotNull