public interface ServerObject extends IdentifiableObject
| Modifier and Type | Method and Description |
|---|---|
APIRequestFuture<Void> |
executeCommand(String command)
Executes the given command as ConsoleSender on the server
|
BaseObject |
getBase()
Returns the base the server has been started by
|
String |
getExtra()
An extra is a custom value users can set per API.
|
ServerGroupObject |
getGroup() |
String |
getId() |
InetAddress |
getIpAddress() |
APIRequestFuture<LogFractionObject> |
getLogFraction(long startTime) |
APIRequestFuture<LogFractionObject> |
getLogFraction(long startTime,
long endTime) |
String |
getMap()
If a server's map is assigned randomly, the map name will be the part of the map directory's name after the '_'.
|
int |
getMaxPlayerCount()
The server's maximum player count
|
MessageClientAddress |
getMessageAddress() |
String |
getMotd()
The server's MOTD (= message of the day)
|
String |
getName() |
int |
getOnlinePlayerCount()
The server's current online player count
|
Collection<PlayerObject> |
getOnlinePlayers() |
int |
getPort() |
InetSocketAddress |
getSocketAddress() |
String |
getState() |
boolean |
isSortedOut() |
void |
sendPluginMessage(PluginMessage message)
Send a plugin message to the server
|
APIRequestFuture<Void> |
setExtra(String extra)
An extra is a custom value users can set per API.
|
APIRequestFuture<Void> |
setState(String state)
Sets the server's state and sends it to TimoCloud BungeeCord
|
APIRequestFuture<Void> |
stop()
Stops the server
|
String getName()
getName in interface IdentifiableObjectString getId()
getId in interface IdentifiableObjectServerGroupObject getGroup()
String getState()
APIRequestFuture<Void> setState(String state)
state - The state, e.g. 'INGAME' or 'FULL'String getExtra()
APIRequestFuture<Void> setExtra(String extra)
String getMap()
String getMotd()
Collection<PlayerObject> getOnlinePlayers()
int getOnlinePlayerCount()
int getMaxPlayerCount()
BaseObject getBase()
InetSocketAddress getSocketAddress()
InetAddress getIpAddress()
int getPort()
boolean isSortedOut()
MessageClientAddress getMessageAddress()
APIRequestFuture<Void> executeCommand(String command)
command - Without leading /APIRequestFuture<Void> stop()
void sendPluginMessage(PluginMessage message)
message - The message which shall be sentAPIRequestFuture<LogFractionObject> getLogFraction(long startTime, long endTime)
startTime - The timestamp at which the record of the log should start (0 if you want all log entries since the server's start)endTime - The timestamp at which the record of the log should endAPIRequestFuture<LogFractionObject> getLogFraction(long startTime)
startTime - The timestamp at which the record of the log should start (0 if you want all log entries since the server's start)Copyright © 2025. All rights reserved.