Interface IServer
public interface IServer
Common server methods
To be implemented for each server software supported by this plugin
-
Method Summary
Modifier and TypeMethodDescriptionvoid
broadcastMessage
(String message) Broadcasts a message to the entire serverint
getMotd()
getName()
IPlayer[]
String[]
getResource
(String path) void
runCommand
(String command) Runs a console command
-
Method Details
-
broadcastMessage
Broadcasts a message to the entire server -
getOnlinePlayers
IPlayer[] getOnlinePlayers()- Returns:
- A list of all online players
-
getOperators
String[] getOperators()- Returns:
- A list of all operators on the server
-
getPlayer
- Returns:
- A player with the given username (if they've joined before)
-
getResource
- Returns:
- A resource from the game's jar file
-
getMaxPlayers
int getMaxPlayers()- Returns:
- A value of the maximum amount of players that can be online at once
-
getName
String getName()- Returns:
- the server's name
-
getMotd
String getMotd()- Returns:
- The server's MOTD
-
getVersion
String getVersion()- Returns:
- The server's version
-
getSoftwareName
String getSoftwareName()- Returns:
- The server software's name
-
runCommand
Runs a console command
-