Class Server
java.lang.Object
fr.hytale.loader.api.Server
Server utility class for server-wide operations.
Provides access to online players, broadcasting, and world management.
- Since:
- 1.0.4
- Version:
- 1.0.4
- Author:
- HytaleLoader
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidBroadcasts a message to all online players.static voidbroadcastPermission(String message, String permission) Broadcasts a message to all online players with a specific permission.static WorldGets the default world of the server.static intGets the number of players currently online.Gets all online players on the server.static PlayerGets a player by their username (case-insensitive).static PlayerGets a player by their UUID.getPlayersInWorld(World world) Gets all players in a specific world.getPlayersInWorld(String worldName) Gets all players in a world by its name.static WorldGets a world by its name.Gets all loaded worlds on the server.
-
Method Details
-
getOnlinePlayers
-
getPlayer
-
getPlayer
-
broadcast
Broadcasts a message to all online players.- Parameters:
message- The message to broadcast
-
broadcastPermission
-
getOnlineCount
public static int getOnlineCount()Gets the number of players currently online.- Returns:
- The online player count
-
getWorlds
-
getWorld
-
getDefaultWorld
Gets the default world of the server.- Returns:
- The default World instance
-
getPlayersInWorld
-
getPlayersInWorld
-