diff --git a/src/main/java/net/minestom/server/event/EventNode.java b/src/main/java/net/minestom/server/event/EventNode.java index ab1740abe..c3a0d5e07 100644 --- a/src/main/java/net/minestom/server/event/EventNode.java +++ b/src/main/java/net/minestom/server/event/EventNode.java @@ -213,7 +213,7 @@ public sealed interface EventNode permits EventNodeImpl { */ default void callCancellable(@NotNull T event, @NotNull Runnable successCallback) { call(event); - if (!(event instanceof CancellableEvent) || !((CancellableEvent) event).isCancelled()) { + if (!(event instanceof CancellableEvent cancellableEvent) || !cancellableEvent.isCancelled()) { successCallback.run(); } }