Class Server
java.lang.Object
net.ME1312.SubServers.Client.Common.Network.API.Server
- Direct Known Subclasses:
SubServer
Simplified Server Data Class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Commands the Servervoid
command
(String command, IntConsumer response) Commands the Servervoid
Commands the Servervoid
command
(UUID player, String command, IntConsumer response) Commands the Servervoid
Commands the Servervoid
command
(UUID player, UUID target, String command, IntConsumer response) Commands the Serverboolean
Get the Address of this ServerGet the Display Name of this ServerGet this Server's GroupsgetMotd()
Gets the MOTD of the ServergetName()
Get the Name of this ServergetRaw()
Get the raw representation of the ServerGet players on this server across all known proxiesvoid
getRemotePlayers
(Consumer<Collection<RemotePlayer>> callback) Get players on this server across all known proxiesGet the Signature of this ObjectGets the SubData Client Channel IDslong
Get the Timestamp for when the data was last refreshedGet a copy of the current whitelistboolean
isHidden()
If the server is hidden from playersboolean
Gets if the Server is Restrictedboolean
isWhitelisted
(UUID player) See if a player is whitelistedvoid
refresh()
Download a new copy of the data from SubData
-
Constructor Details
-
Server
Create an API representation of a Server- Parameters:
raw
- Raw representation of the Server
-
-
Method Details
-
equals
-
refresh
public void refresh()Download a new copy of the data from SubData -
getSubData
Gets the SubData Client Channel IDs- Returns:
- SubData Client Channel ID Array
-
getName
Get the Name of this Server- Returns:
- Server Name
-
getDisplayName
Get the Display Name of this Server- Returns:
- Display Name
-
getAddress
Get the Address of this Server- Returns:
- Server Address
-
getGroups
Get this Server's Groups- Returns:
- Group names
-
command
Commands the Server- Parameters:
player
- Player who's Commandingtarget
- Player who will Sendcommand
- Commmand to Sendresponse
- Response Code
-
command
Commands the Server- Parameters:
player
- Player who's Commandingcommand
- Commmand to Sendresponse
- Response Code
-
command
Commands the Server- Parameters:
command
- Commmand to Sendresponse
- Response Code
-
command
Commands the Server- Parameters:
player
- Player who's Commandingtarget
- Player who's Commandingcommand
- Command to Send
-
command
Commands the Server- Parameters:
player
- Player who's Commandingcommand
- Command to Send
-
command
Commands the Server- Parameters:
command
- Command to Send
-
getRemotePlayers
Get players on this server across all known proxies- Returns:
- Remote Player Collection
-
getRemotePlayers
Get players on this server across all known proxies- Parameters:
callback
- Remote Player Collection
-
isHidden
public boolean isHidden()If the server is hidden from players- Returns:
- Hidden Status
-
getMotd
Gets the MOTD of the Server- Returns:
- Server MOTD
-
isRestricted
public boolean isRestricted()Gets if the Server is Restricted- Returns:
- Restricted Status
-
getWhitelist
Get a copy of the current whitelist- Returns:
- Player Whitelist
-
isWhitelisted
See if a player is whitelisted- Parameters:
player
- Player to check- Returns:
- Whitelisted Status
-
getSignature
Get the Signature of this Object- Returns:
- Object Signature
-
getTimestamp
public long getTimestamp()Get the Timestamp for when the data was last refreshed- Returns:
- Data Timestamp
-
getRaw
Get the raw representation of the Server- Returns:
- Raw Server
-