2018-08-05 23:41:17 +02:00
|
|
|
package net.ME1312.SubServers.Bungee.Event;
|
|
|
|
|
2020-11-16 21:34:59 +01:00
|
|
|
import net.ME1312.Galaxi.Library.Util;
|
2019-04-18 16:02:09 +02:00
|
|
|
import net.ME1312.SubData.Server.DataClient;
|
|
|
|
import net.ME1312.SubData.Server.DataServer;
|
|
|
|
import net.ME1312.SubData.Server.Library.DisconnectReason;
|
2018-08-05 23:41:17 +02:00
|
|
|
import net.ME1312.SubServers.Bungee.Library.SubEvent;
|
2020-11-16 21:34:59 +01:00
|
|
|
|
2018-08-05 23:41:17 +02:00
|
|
|
import net.md_5.bungee.api.plugin.Event;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SubData Network Disconnect Event
|
|
|
|
*/
|
|
|
|
public class SubNetworkDisconnectEvent extends Event implements SubEvent {
|
2019-04-18 16:02:09 +02:00
|
|
|
private DataServer network;
|
|
|
|
private DataClient client;
|
|
|
|
private DisconnectReason reason;
|
2018-08-05 23:41:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SubData Network Disconnect Event
|
|
|
|
*/
|
2019-04-18 16:02:09 +02:00
|
|
|
public SubNetworkDisconnectEvent(DataServer network, DataClient client, DisconnectReason reason) {
|
2021-10-24 06:14:07 +02:00
|
|
|
Util.nullpo(network, client, reason);
|
2018-08-05 23:41:17 +02:00
|
|
|
this.network = network;
|
|
|
|
this.client = client;
|
2019-04-18 16:02:09 +02:00
|
|
|
this.reason = reason;
|
2018-08-05 23:41:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the network the client is disconnecting from
|
|
|
|
*
|
|
|
|
* @return SubData Network
|
|
|
|
*/
|
2019-04-18 16:02:09 +02:00
|
|
|
public DataServer getNetwork() {
|
2018-08-05 23:41:17 +02:00
|
|
|
return network;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the disconnecting client
|
|
|
|
*
|
|
|
|
* @return Client
|
|
|
|
*/
|
2019-04-18 16:02:09 +02:00
|
|
|
public DataClient getClient() {
|
2018-08-05 23:41:17 +02:00
|
|
|
return client;
|
|
|
|
}
|
|
|
|
|
2019-04-18 16:02:09 +02:00
|
|
|
/**
|
|
|
|
* Get the reason the client disconnected
|
|
|
|
*
|
|
|
|
* @return Disconnect Reason
|
|
|
|
*/
|
|
|
|
public DisconnectReason getReason() {
|
|
|
|
return reason;
|
|
|
|
}
|
2018-08-05 23:41:17 +02:00
|
|
|
}
|