diff options
author | Pante <matthiasngeozhongsim@yahoo.com> | 2018-08-14 23:07:05 +0800 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-09-08 13:34:53 +1000 |
commit | 310dc8098d95ca47e8d7f29fdf003757b9dcaace (patch) | |
tree | f32038d2522d4670a970c87c198f9a15c45a8e79 | |
parent | 12bbe1d15f764e587f5284b7f3c2a79bcc08c680 (diff) | |
download | bukkit-310dc8098d95ca47e8d7f29fdf003757b9dcaace.tar bukkit-310dc8098d95ca47e8d7f29fdf003757b9dcaace.tar.gz bukkit-310dc8098d95ca47e8d7f29fdf003757b9dcaace.tar.lz bukkit-310dc8098d95ca47e8d7f29fdf003757b9dcaace.tar.xz bukkit-310dc8098d95ca47e8d7f29fdf003757b9dcaace.zip |
Add ServerLoadEvent
-rw-r--r-- | src/main/java/org/bukkit/event/server/ServerLoadEvent.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/server/ServerLoadEvent.java b/src/main/java/org/bukkit/event/server/ServerLoadEvent.java new file mode 100644 index 00000000..b0e9cd82 --- /dev/null +++ b/src/main/java/org/bukkit/event/server/ServerLoadEvent.java @@ -0,0 +1,51 @@ +package org.bukkit.event.server; + +import org.bukkit.Warning; +import org.bukkit.event.HandlerList; + +/** + * This event is called when either the server startup or reload has completed. + * + * @deprecated draft API + */ +@Deprecated +@Warning(false) +public class ServerLoadEvent extends ServerEvent { + + /** + * Represents the context in which the enclosing event has been completed. + */ + public enum LoadType { + STARTUP, RELOAD; + } + + private static final HandlerList handlers = new HandlerList(); + private final LoadType type; + + /** + * Creates a {@code ServerLoadEvent} with a given loading type. + * + * @param type the context in which the server was loaded + */ + public ServerLoadEvent(LoadType type) { + this.type = type; + } + + /** + * Gets the context in which the server was loaded. + * + * @return the context in which the server was loaded + */ + public LoadType getType() { + return type; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } +} |