diff options
author | Jake Potrebic <[email protected]> | 2024-06-14 14:07:44 -0700 |
---|---|---|
committer | Jake Potrebic <[email protected]> | 2024-06-14 14:07:44 -0700 |
commit | ffe310a8e1dd4ed1027e903b4683f0ab42ee9ff8 (patch) | |
tree | 7748595488691c8494b5bdb2d01711a5242f6b34 /patches/api/0027-Add-a-call-helper-to-Event.patch | |
parent | 188cff20c75367d8c90ae548a0dd528805d4a5a3 (diff) | |
download | Paper-ffe310a8e1dd4ed1027e903b4683f0ab42ee9ff8.tar.gz Paper-ffe310a8e1dd4ed1027e903b4683f0ab42ee9ff8.zip |
remove api that was scheduled for removal
Diffstat (limited to 'patches/api/0027-Add-a-call-helper-to-Event.patch')
-rw-r--r-- | patches/api/0027-Add-a-call-helper-to-Event.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/api/0027-Add-a-call-helper-to-Event.patch b/patches/api/0027-Add-a-call-helper-to-Event.patch new file mode 100644 index 0000000000..4b287bfa56 --- /dev/null +++ b/patches/api/0027-Add-a-call-helper-to-Event.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Sun, 19 May 2013 20:36:58 -0400 +Subject: [PATCH] Add a call helper to Event + +Reduces diff in Server patches + +diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java +index 18d0636b749913bfdcea8eebc7d0840d192fb071..8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0 100644 +--- a/src/main/java/org/bukkit/event/Event.java ++++ b/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() |