PlayerList
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.server.PlayerList;
Methods
Return Type: int
// PlayerList.getMaxPlayers() as int
myPlayerList.getMaxPlayers();
Return Type: ServerPlayer?
PlayerList.getPlayer(uuid as invalid) as ServerPlayer?
Parameter | Type |
---|---|
Parameter uuid | Type invalid |
Return Type: ServerPlayer?
PlayerList.getPlayerByName($$0 as string) as ServerPlayer?
Parameter | Type |
---|---|
Parameter $$0 | Type string |
Return Type: int
// PlayerList.getPlayerCount() as int
myPlayerList.getPlayerCount();
Return Type: stdlib.List<ServerPlayer>
// PlayerList.getPlayers() as stdlib.List<ServerPlayer>
myPlayerList.getPlayers();
Return Type: Server
// PlayerList.getServer() as Server
myPlayerList.getServer();
Return Type: int
// PlayerList.getSimulationDistance() as int
myPlayerList.getSimulationDistance();
Return Type: int
// PlayerList.getViewDistance() as int
myPlayerList.getViewDistance();
Return Type: boolean
// PlayerList.isAllowCheatsForAllPlayers() as boolean
myPlayerList.isAllowCheatsForAllPlayers();
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name isAllowCheatsForAllPlayers | Type boolean | Has Getter true | Has Setter false |
Name maxPlayers | Type int | Has Getter true | Has Setter false |
Name playerCount | Type int | Has Getter true | Has Setter false |
Name players | Type stdlib.List<ServerPlayer> | Has Getter true | Has Setter false |
Name server | Type Server | Has Getter true | Has Setter false |
Name simulationDistance | Type int | Has Getter true | Has Setter false |
Name viewDistance | Type int | Has Getter true | Has Setter false |