PlayerList
Link to playerlist
Importare la Classe
Link to importare-la-classe
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.
ZenScript Copyimport crafttweaker.api.server.PlayerList;
Metodi
Link to metodi
Name: getMaxPlayers
Return Type: int
ZenScript Copy// PlayerList.getMaxPlayers() as int
myPlayerList.getMaxPlayers();
Name: getPlayer
Return Type: ServerPlayer?
ZenScript CopyPlayerList.getPlayer(uuid as invalid) as ServerPlayer?
Parametro | Tipo |
---|---|
Parametro uuid | Tipo invalid |
Name: getPlayerByName
Return Type: ServerPlayer?
ZenScript CopyPlayerList.getPlayerByName($$0 as string) as ServerPlayer?
Parametro | Tipo |
---|---|
Parametro $$0 | Tipo string |
Name: getPlayerCount
Return Type: int
ZenScript Copy// PlayerList.getPlayerCount() as int
myPlayerList.getPlayerCount();
Name: getPlayers
Return Type: stdlib.List<ServerPlayer>
ZenScript Copy// PlayerList.getPlayers() as stdlib.List<ServerPlayer>
myPlayerList.getPlayers();
Name: getServer
Return Type: Server
ZenScript Copy// PlayerList.getServer() as Server
myPlayerList.getServer();
Name: getSimulationDistance
Return Type: int
ZenScript Copy// PlayerList.getSimulationDistance() as int
myPlayerList.getSimulationDistance();
Name: getViewDistance
Return Type: int
ZenScript Copy// PlayerList.getViewDistance() as int
myPlayerList.getViewDistance();
Name: isAllowCheatsForAllPlayers
Return Type: boolean
ZenScript Copy// PlayerList.isAllowCheatsForAllPlayers() as boolean
myPlayerList.isAllowCheatsForAllPlayers();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome isAllowCheatsForAllPlayers | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome maxPlayers | Tipo int | Ha Getter sì | Ha Setter no |
Nome playerCount | Tipo int | Ha Getter sì | Ha Setter no |
Nome players | Tipo stdlib.List<ServerPlayer> | Ha Getter sì | Ha Setter no |
Nome server | Tipo Server | Ha Getter sì | Ha Setter no |
Nome simulationDistance | Tipo int | Ha Getter sì | Ha Setter no |
Nome viewDistance | Tipo int | Ha Getter sì | Ha Setter no |