Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

PlayerList

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.server.PlayerList;

Members

getPlayer(uuid as UUID) as ServerPlayer
script.zs
// PlayerList.getPlayer(uuid as UUID) as ServerPlayer;
myPlayerList.getPlayer(myUUID);

Parameters:

uuid Type: UUID

Return Type: ServerPlayer

getPlayerByName(name as string) as ServerPlayer
script.zs
// PlayerList.getPlayerByName(name as string) as ServerPlayer;
myPlayerList.getPlayerByName(myString);

Parameters:

name Type: string

Return Type: ServerPlayer

Getter
script.zs
// PlayerList.isAllowCheatsForAllPlayers as bool
myPlayerList.isAllowCheatsForAllPlayers

Return Type: bool

isAllowCheatsForAllPlayers() as bool
script.zs
// PlayerList.isAllowCheatsForAllPlayers() as bool;
myPlayerList.isAllowCheatsForAllPlayers();

Return Type: bool

Getter
script.zs
// PlayerList.maxPlayers as int
myPlayerList.maxPlayers

Return Type: int

maxPlayers() as int
script.zs
// PlayerList.maxPlayers() as int;
myPlayerList.maxPlayers();

Return Type: int

Getter
script.zs
// PlayerList.playerCount as int
myPlayerList.playerCount

Return Type: int

playerCount() as int
script.zs
// PlayerList.playerCount() as int;
myPlayerList.playerCount();

Return Type: int

Getter
script.zs
// PlayerList.players as List<ServerPlayer>
myPlayerList.players

Return Type: List<ServerPlayer>

players() as List<ServerPlayer>
script.zs
// PlayerList.players() as List<ServerPlayer>;
myPlayerList.players();

Return Type: List<ServerPlayer>

Getter
script.zs
// PlayerList.server as MinecraftServer
myPlayerList.server

Return Type: Server

server() as MinecraftServer
script.zs
// PlayerList.server() as MinecraftServer;
myPlayerList.server();

Return Type: Server

Getter
script.zs
// PlayerList.simulationDistance as int
myPlayerList.simulationDistance

Return Type: int

simulationDistance() as int
script.zs
// PlayerList.simulationDistance() as int;
myPlayerList.simulationDistance();

Return Type: int

Getter
script.zs
// PlayerList.viewDistance as int
myPlayerList.viewDistance

Return Type: int

viewDistance() as int
script.zs
// PlayerList.viewDistance() as int;
myPlayerList.viewDistance();

Return Type: int