diff --git a/paper-api/src/main/java/org/bukkit/event/Event.java b/paper-api/src/main/java/org/bukkit/event/Event.java index 18d0636b74..8ec56cd6b8 100644 --- a/paper-api/src/main/java/org/bukkit/event/Event.java +++ b/paper-api/src/main/java/org/bukkit/event/Event.java @@ -35,6 +35,22 @@ public abstract class Event { this.async = isAsync; } + // Paper start + /** + * Calls the event and tests if cancelled. + * + * @return false if event was cancelled, if cancellable. otherwise true. + */ + public boolean callEvent() { + org.bukkit.Bukkit.getPluginManager().callEvent(this); + if (this instanceof Cancellable) { + return !((Cancellable) this).isCancelled(); + } else { + return true; + } + } + // Paper end + /** * Convenience method for providing a user-friendly identifier. By * default, it is the event's class's {@linkplain Class#getSimpleName()