mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Add ServerLoadEvent
This commit is contained in:
parent
12bbe1d15f
commit
310dc8098d
1 changed files with 51 additions and 0 deletions
51
src/main/java/org/bukkit/event/server/ServerLoadEvent.java
Normal file
51
src/main/java/org/bukkit/event/server/ServerLoadEvent.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue