SubServers-2/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Host/Server.java

146 lines
2.9 KiB
Java
Raw Normal View History

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;
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;
import java.util.List;
2017-12-10 15:14:49 +01:00
import java.util.UUID;
2016-12-05 04:21:04 +01: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
*/
String getDisplayName();
2017-01-26 23:19:48 +01:00
/**
* Sets the Display Name for this Server
*
* @param value Value (or null to reset)
*/
void setDisplayName(String value);
2017-01-26 23:19:48 +01:00
2016-12-20 00:31:01 +01:00
/**
* Get this Server's Groups
*
* @return Group names
*/
List<String> getGroups();
/**
* Add this Server to a Group
*
* @param value Group name
*/
void addGroup(String value);
/**
* Remove this Server from a Group
*
* @param value value Group name
*/
void removeGroup(String value);
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();
/**
* If the server is hidden from players
2016-12-20 00:31:01 +01:00
*
* @return Hidden Status
*/
boolean isHidden();
2016-12-20 00:31:01 +01:00
/**
* Set if the server is hidden from players
2016-12-20 00:31:01 +01:00
*
* @param value Value
*/
void setHidden(boolean value);
2016-12-20 00:31:01 +01:00
/**
* Gets the MOTD of the Server
2016-12-20 00:31:01 +01:00
*
* @return Server MOTD
*/
String getMotd();
2016-12-20 00:31:01 +01:00
/**
* Sets the MOTD of the Server
2016-12-20 00:31:01 +01:00
*
* @param value Value
*/
void setMotd(String value);
2016-12-20 00:31:01 +01:00
/**
* Gets if the Server is Restricted
2016-12-20 00:31:01 +01:00
*
* @return Restricted Status
2017-08-26 07:19:59 +02:00
*/
boolean isRestricted();
2017-08-26 07:19:59 +02:00
2016-12-20 00:31:01 +01:00
/**
* Sets if the Server is Restricted
2016-12-20 00:31:01 +01:00
*
* @param value Value
2016-12-20 00:31:01 +01:00
*/
void setRestricted(boolean value);
/**
* 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);
/**
* Get the Signature of this Object
*
* @return Object Signature
*/
String getSignature();
2016-12-05 04:21:04 +01:00
}