-
Notifications
You must be signed in to change notification settings - Fork 23
/
SubNetworkDisconnectEvent.java
55 lines (48 loc) · 1.36 KB
/
SubNetworkDisconnectEvent.java
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
52
53
54
55
package net.ME1312.SubServers.Bungee.Event;
import net.ME1312.Galaxi.Library.Util;
import net.ME1312.SubData.Server.DataClient;
import net.ME1312.SubData.Server.DataServer;
import net.ME1312.SubData.Server.Library.DisconnectReason;
import net.ME1312.SubServers.Bungee.Library.SubEvent;
import net.md_5.bungee.api.plugin.Event;
/**
* SubData Network Disconnect Event
*/
public class SubNetworkDisconnectEvent extends Event implements SubEvent {
private DataServer network;
private DataClient client;
private DisconnectReason reason;
/**
* SubData Network Disconnect Event
*/
public SubNetworkDisconnectEvent(DataServer network, DataClient client, DisconnectReason reason) {
if (Util.isNull(network, client, reason)) throw new NullPointerException();
this.network = network;
this.client = client;
this.reason = reason;
}
/**
* Get the network the client is disconnecting from
*
* @return SubData Network
*/
public DataServer getNetwork() {
return network;
}
/**
* Get the disconnecting client
*
* @return Client
*/
public DataClient getClient() {
return client;
}
/**
* Get the reason the client disconnected
*
* @return Disconnect Reason
*/
public DisconnectReason getReason() {
return reason;
}
}