summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/event/server/ServerLoadEvent.java
blob: b0e9cd8262fffe6de08f99de92e1b97d1a840fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
    }
}