From eaea090d37e19c86d7641f79e7ca7b429048fa3a Mon Sep 17 00:00:00 2001 From: Dabo Ross Date: Thu, 5 Sep 2013 01:55:08 -0700 Subject: [PATCH] Add EventPriority --- .../net/md_5/bungee/event/EventPriority.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 event/src/main/java/net/md_5/bungee/event/EventPriority.java diff --git a/event/src/main/java/net/md_5/bungee/event/EventPriority.java b/event/src/main/java/net/md_5/bungee/event/EventPriority.java new file mode 100644 index 000000000..e21898d66 --- /dev/null +++ b/event/src/main/java/net/md_5/bungee/event/EventPriority.java @@ -0,0 +1,45 @@ +package net.md_5.bungee.event; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * Importance of the {@link EventHandler}. When executing an Event, the handlers + * are called in order of their Priority. + */ +@AllArgsConstructor +public enum EventPriority +{ + + /** + * Lowest EventPriority. Use this priority to allow other plugins to further + * customize the outcome. + */ + LOWEST( 0 ), + /** + * Higher than lowest, lower than normal. + */ + LOW( 1 ), + /** + * Default EventPriority + */ + NORMAL( 2 ), + /** + * High EventPriority. Use this priority to have more verdict on the + * outcome. + */ + HIGH( 3 ), + /** + * Most important EventPriorty for changes. Use this priority to have + * absolute verdict of the outcome of this event. + */ + HIGHEST( 4 ), + /** + * Logging/Monitor EventPriority. This priority is for read only + * event handlers. Do not change the outcome of the event in this priority. + * Intended for logging purposes. + */ + MONITOR( 5 ); + @Getter + private final int priority; +} \ No newline at end of file