2016-12-24 05:55:17 +01:00
|
|
|
package net.ME1312.SubServers.Bungee.Host;
|
2016-12-05 04:21:04 +01:00
|
|
|
|
2019-04-18 16:02:09 +02:00
|
|
|
import net.ME1312.Galaxi.Library.ExtraDataHandler;
|
|
|
|
import net.ME1312.Galaxi.Library.NamedContainer;
|
|
|
|
import net.ME1312.SubData.Server.ClientHandler;
|
2019-05-10 04:43:34 +02:00
|
|
|
import net.ME1312.SubData.Server.DataClient;
|
2017-08-27 05:56:15 +02:00
|
|
|
import net.md_5.bungee.api.config.ServerInfo;
|
2016-12-05 04:21:04 +01:00
|
|
|
|
2017-12-10 15:14:49 +01:00
|
|
|
import java.util.Collection;
|
2017-08-27 20:37:25 +02:00
|
|
|
import java.util.List;
|
2017-12-10 15:14:49 +01:00
|
|
|
import java.util.UUID;
|
2016-12-05 04:21:04 +01:00
|
|
|
|
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Server Interface
|
2016-12-05 04:21:04 +01:00
|
|
|
*/
|
2019-05-10 04:43:34 +02:00
|
|
|
public interface Server extends ServerInfo, ClientHandler, ExtraDataHandler {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Link a SubData Client to this Object
|
|
|
|
*
|
|
|
|
* @param client Client to Link
|
|
|
|
* @param channel Channel ID
|
|
|
|
*/
|
|
|
|
void setSubData(DataClient client, int channel);
|
2016-12-20 00:31:01 +01:00
|
|
|
|
2017-01-26 23:19:48 +01:00
|
|
|
/**
|
|
|
|
* Get the Display Name of this Server
|
|
|
|
*
|
|
|
|
* @return Display Name
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
String getDisplayName();
|
2017-01-26 23:19:48 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the Display Name for this Server
|
|
|
|
*
|
|
|
|
* @param value Value (or null to reset)
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void setDisplayName(String value);
|
2017-01-26 23:19:48 +01:00
|
|
|
|
2016-12-20 00:31:01 +01:00
|
|
|
/**
|
2017-08-27 05:56:15 +02:00
|
|
|
* Get this Server's Groups
|
|
|
|
*
|
|
|
|
* @return Group names
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
List<String> getGroups();
|
2017-08-27 05:56:15 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add this Server to a Group
|
|
|
|
*
|
|
|
|
* @param value Group name
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void addGroup(String value);
|
2017-08-27 05:56:15 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove this Server from a Group
|
|
|
|
*
|
|
|
|
* @param value value Group name
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void removeGroup(String value);
|
2017-08-27 05:56:15 +02:00
|
|
|
|
2017-12-10 15:14:49 +01:00
|
|
|
/**
|
|
|
|
* Get players on this server across all known proxies
|
|
|
|
*
|
|
|
|
* @return Player Collection
|
|
|
|
*/
|
|
|
|
Collection<NamedContainer<String, UUID>> getGlobalPlayers();
|
|
|
|
|
2017-08-27 05:56:15 +02:00
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* If the server is hidden from players
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
|
|
|
* @return Hidden Status
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
boolean isHidden();
|
2016-12-20 00:31:01 +01:00
|
|
|
|
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Set if the server is hidden from players
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
|
|
|
* @param value Value
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void setHidden(boolean value);
|
2017-08-27 05:56:15 +02:00
|
|
|
|
2016-12-20 00:31:01 +01:00
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Gets the MOTD of the Server
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
|
|
|
* @return Server MOTD
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
String getMotd();
|
2016-12-20 00:31:01 +01:00
|
|
|
|
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Sets the MOTD of the Server
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
|
|
|
* @param value Value
|
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void setMotd(String value);
|
2016-12-20 00:31:01 +01:00
|
|
|
|
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Gets if the Server is Restricted
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
2017-08-27 20:37:25 +02:00
|
|
|
* @return Restricted Status
|
2017-08-26 07:19:59 +02:00
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
boolean isRestricted();
|
2017-08-26 07:19:59 +02:00
|
|
|
|
2016-12-20 00:31:01 +01:00
|
|
|
/**
|
2017-08-27 20:37:25 +02:00
|
|
|
* Sets if the Server is Restricted
|
2016-12-20 00:31:01 +01:00
|
|
|
*
|
2017-08-27 20:37:25 +02:00
|
|
|
* @param value Value
|
2016-12-20 00:31:01 +01:00
|
|
|
*/
|
2017-08-27 20:37:25 +02:00
|
|
|
void setRestricted(boolean value);
|
2017-12-10 01:30:06 +01:00
|
|
|
|
2019-01-10 21:52:38 +01:00
|
|
|
/**
|
|
|
|
* Get a copy of the current whitelist
|
|
|
|
*
|
|
|
|
* @return Player Whitelist
|
|
|
|
*/
|
|
|
|
Collection<UUID> getWhitelist();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See if a player is whitelisted
|
|
|
|
*
|
|
|
|
* @param player Player to check
|
|
|
|
* @return Whitelisted Status
|
|
|
|
*/
|
|
|
|
boolean isWhitelisted(UUID player);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a player to the whitelist (for use with restricted servers)
|
|
|
|
*
|
|
|
|
* @param player Player to add
|
|
|
|
*/
|
|
|
|
void whitelist(UUID player);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a player to the whitelist
|
|
|
|
*
|
|
|
|
* @param player Player to remove
|
|
|
|
*/
|
|
|
|
void unwhitelist(UUID player);
|
|
|
|
|
2017-12-10 01:30:06 +01:00
|
|
|
/**
|
|
|
|
* Get the Signature of this Object
|
|
|
|
*
|
|
|
|
* @return Object Signature
|
|
|
|
*/
|
|
|
|
String getSignature();
|
2016-12-05 04:21:04 +01:00
|
|
|
}
|