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.
import crafttweaker . api.game . Server;
Server extends ReentrantBlockableEventLoop <TickTask >
.
Server
implements the following interfaces:
CommandSource
Undocumented Interfaces ServerInfo
, ProfilerMeasured
, ProcessorHandle <Runnable >
, Executor
// MinecraftServer.absoluteMaxWorldSize as int
myMinecraftServer . absoluteMaxWorldSize
Return Type:
int
// MinecraftServer.absoluteMaxWorldSize() as int;
myMinecraftServer . absoluteMaxWorldSize();
Return Type:
int
// MinecraftServer.acceptsFailure as bool
myMinecraftServer . acceptsFailure
Return Type:
bool
// MinecraftServer.acceptsFailure() as bool;
myMinecraftServer . acceptsFailure();
Return Type:
bool
// MinecraftServer.acceptsSuccess as bool
myMinecraftServer . acceptsSuccess
Return Type:
bool
// MinecraftServer.acceptsSuccess() as bool;
myMinecraftServer . acceptsSuccess();
Return Type:
bool
// MinecraftServer.allLevels as Iterable<ServerLevel>
myMinecraftServer . allLevels
Return Type:
Iterable <ServerLevel >
// MinecraftServer.allLevels() as Iterable<ServerLevel>;
myMinecraftServer . allLevels();
Return Type:
Iterable <ServerLevel >
// MinecraftServer.alwaysAccepts as bool
myMinecraftServer . alwaysAccepts
Return Type:
bool
// MinecraftServer.alwaysAccepts() as bool;
myMinecraftServer . alwaysAccepts();
Return Type:
bool
// MinecraftServer.areNpcsEnabled as bool
myMinecraftServer . areNpcsEnabled
Return Type:
bool
// MinecraftServer.areNpcsEnabled() as bool;
myMinecraftServer . areNpcsEnabled();
Return Type:
bool
// MinecraftServer.averageTickTime as float
myMinecraftServer . averageTickTime
Return Type:
float
// MinecraftServer.averageTickTime() as float;
myMinecraftServer . averageTickTime();
Return Type:
float
// MinecraftServer.defaultGameTime as GameType
myMinecraftServer . defaultGameTime
Return Type:
GameType
// MinecraftServer.defaultGameTime() as GameType;
myMinecraftServer . defaultGameTime();
Return Type:
GameType
Runs a command, if silent is true, the output is hidden. Returns The success value of the command, or 0 if an exception occurred. Note: Some commands' success value is 0
// MinecraftServer.executeCommand(command as string, silent as bool = false) as int;
myMinecraftServer . executeCommand( "time set day" , true );
Parameters:
command: string
Type: string
silent: bool
(optional) Type: bool
Default Value: false
Return Type:
int
let a player send a command, if silent is true, the output is hidden. Returns The success value of the command, or 0 if an exception occurred. Note: Some commands' success value is 0
// MinecraftServer.executeCommand(command as string, player as Player, silent as bool = false) as int;
myMinecraftServer . executeCommand( "time set day" , player, true );
Parameters:
command: string
Type: string
silent: bool
(optional) Type: bool
Default Value: false
Return Type:
int
// MinecraftServer.forcedGameType as GameType
myMinecraftServer . forcedGameType
Return Type:
GameType
// MinecraftServer.forcedGameType() as GameType;
myMinecraftServer . forcedGameType();
Return Type:
GameType
// MinecraftServer.getLevel(location as ResourceLocation) as ServerLevel;
myMinecraftServer . getLevel(myResourceLocation);
Return Type:
ServerLevel
// MinecraftServer.getSpawnRadius(level as ServerLevel) as int;
myMinecraftServer . getSpawnRadius(myServerLevel);
Return Type:
int
// MinecraftServer.isCommandBlockEnabled as bool
myMinecraftServer . isCommandBlockEnabled
Return Type:
bool
// MinecraftServer.isCommandBlockEnabled() as bool;
myMinecraftServer . isCommandBlockEnabled();
Return Type:
bool
// MinecraftServer.isDedicatedServer as bool
myMinecraftServer . isDedicatedServer
Return Type:
bool
// MinecraftServer.isDedicatedServer() as bool;
myMinecraftServer . isDedicatedServer();
Return Type:
bool
// MinecraftServer.isEnforceWhitelist as bool
myMinecraftServer . isEnforceWhitelist
Return Type:
bool
// MinecraftServer.isEnforceWhitelist() as bool;
myMinecraftServer . isEnforceWhitelist();
Return Type:
bool
// MinecraftServer.isFlightAllowed as bool
myMinecraftServer . isFlightAllowed
Return Type:
bool
// MinecraftServer.isFlightAllowed() as bool;
myMinecraftServer . isFlightAllowed();
Return Type:
bool
// MinecraftServer.isHardcore as bool
myMinecraftServer . isHardcore
Return Type:
bool
// MinecraftServer.isHardcore() as bool;
myMinecraftServer . isHardcore();
Return Type:
bool
// MinecraftServer.isNetherEnabled as bool
myMinecraftServer . isNetherEnabled
Return Type:
bool
// MinecraftServer.isNetherEnabled() as bool;
myMinecraftServer . isNetherEnabled();
Return Type:
bool
// MinecraftServer.isPvpAllowed as bool
myMinecraftServer . isPvpAllowed
Return Type:
bool
// MinecraftServer.isPvpAllowed() as bool;
myMinecraftServer . isPvpAllowed();
Return Type:
bool
// MinecraftServer.isReady as bool
myMinecraftServer . isReady
Return Type:
bool
// MinecraftServer.isReady() as bool;
myMinecraftServer . isReady();
Return Type:
bool
// MinecraftServer.isRunning as bool
myMinecraftServer . isRunning
Return Type:
bool
// MinecraftServer.isRunning() as bool;
myMinecraftServer . isRunning();
Return Type:
bool
// MinecraftServer.isShutdown as bool
myMinecraftServer . isShutdown
Return Type:
bool
// MinecraftServer.isShutdown() as bool;
myMinecraftServer . isShutdown();
Return Type:
bool
// MinecraftServer.isSingleplayer as bool
myMinecraftServer . isSingleplayer
Return Type:
bool
// MinecraftServer.isSingleplayer() as bool;
myMinecraftServer . isSingleplayer();
Return Type:
bool
// MinecraftServer.isSpawningAnimals as bool
myMinecraftServer . isSpawningAnimals
Return Type:
bool
// MinecraftServer.isSpawningAnimals() as bool;
myMinecraftServer . isSpawningAnimals();
Return Type:
bool
// MinecraftServer.isSpawningMonsters as bool
myMinecraftServer . isSpawningMonsters
Return Type:
bool
// MinecraftServer.isSpawningMonsters() as bool;
myMinecraftServer . isSpawningMonsters();
Return Type:
bool
// MinecraftServer.isStopped as bool
myMinecraftServer . isStopped
Return Type:
bool
// MinecraftServer.isStopped() as bool;
myMinecraftServer . isStopped();
Return Type:
bool
// MinecraftServer.isUnderSpawnProtection(level as ServerLevel, pos as BlockPos, player as Player) as bool;
myMinecraftServer . isUnderSpawnProtection(myServerLevel, myBlockPos, myPlayer);
Return Type:
bool
// MinecraftServer.levelKeys as List<ResourceLocation>
myMinecraftServer . levelKeys
Return Type:
List <ResourceLocation >
// MinecraftServer.levelKeys() as List<ResourceLocation>;
myMinecraftServer . levelKeys();
Return Type:
List <ResourceLocation >
// MinecraftServer.maxPlayer as int
myMinecraftServer . maxPlayer
Return Type:
int
// MinecraftServer.maxPlayer() as int;
myMinecraftServer . maxPlayer();
Return Type:
int
// MinecraftServer.moddeStatus as string
myMinecraftServer . moddeStatus
Return Type:
string
// MinecraftServer.moddeStatus() as string;
myMinecraftServer . moddeStatus();
Return Type:
string
// MinecraftServer.motd as string
Return Type:
string
// MinecraftServer.motd() as string;
myMinecraftServer . motd();
Return Type:
string
// MinecraftServer.operatorUserPermissionLevel as int
myMinecraftServer . operatorUserPermissionLevel
Return Type:
int
// MinecraftServer.operatorUserPermissionLevel() as int;
myMinecraftServer . operatorUserPermissionLevel();
Return Type:
int
// MinecraftServer.overworld as ServerLevel
myMinecraftServer . overworld
Return Type:
ServerLevel
// MinecraftServer.overworld() as ServerLevel;
myMinecraftServer . overworld();
Return Type:
ServerLevel
Gets the custom data of the overworld. The overworld is always loaded, so this can be used to store and access data no matter what level a player may be in.
// MinecraftServer.overworldData as CraftTweakerSavedData
myMinecraftServer . overworldData
Return Type:
CraftTweakerSavedData
Gets the custom data of the overworld. The overworld is always loaded, so this can be used to store and access data no matter what level a player may be in.
Returns : The overworld's custom data.
// MinecraftServer.overworldData() as CraftTweakerSavedData;
myMinecraftServer . overworldData();
Return Type:
CraftTweakerSavedData
// MinecraftServer.playerCount as int
myMinecraftServer . playerCount
Return Type:
int
// MinecraftServer.playerCount() as int;
myMinecraftServer . playerCount();
Return Type:
int
// MinecraftServer.playerList as PlayerList
myMinecraftServer . playerList
Return Type:
PlayerList
// MinecraftServer.playerList() as PlayerList;
myMinecraftServer . playerList();
Return Type:
PlayerList
// MinecraftServer.playerNames as string[]
myMinecraftServer . playerNames
Return Type:
string []
// MinecraftServer.playerNames() as string[];
myMinecraftServer . playerNames();
Return Type:
string []
// MinecraftServer.sendMessage(component as Component);
myMinecraftServer . sendMessage(myComponent);
// MinecraftServer.serverModName as string
myMinecraftServer . serverModName
Return Type:
string
// MinecraftServer.serverModName() as string;
myMinecraftServer . serverModName();
Return Type:
string
// MinecraftServer.serverVersion as string
myMinecraftServer . serverVersion
Return Type:
string
// MinecraftServer.serverVersion() as string;
myMinecraftServer . serverVersion();
Return Type:
string
// MinecraftServer.setDefaultGameType(gameType as GameType);
myMinecraftServer . setDefaultGameType(myGameType);
// MinecraftServer.setDifficulty(difficulty as Difficulty, force as bool);
myMinecraftServer . setDifficulty(myDifficulty, myBool);
// MinecraftServer.setDifficultyLocked(locked as bool);
myMinecraftServer . setDifficultyLocked(myBool);
// MinecraftServer.setEnforceWhitelist(enforceWhitelist as bool);
myMinecraftServer . setEnforceWhitelist(myBool);
Parameters:
enforceWhitelist: bool
Type: bool
// MinecraftServer.setFlightAllowed(flightAllowed as bool);
myMinecraftServer . setFlightAllowed(myBool);
Parameters:
flightAllowed: bool
Type: bool
// MinecraftServer.setMotd(motd as string);
myMinecraftServer . setMotd(myString);
Parameters:
motd: string
Type: string
// MinecraftServer.setPvpAllowed(pvpAllowed as bool);
myMinecraftServer . setPvpAllowed(myBool);
Parameters:
pvpAllowed: bool
Type: bool
// MinecraftServer.shouldInformAdmins as bool
myMinecraftServer . shouldInformAdmins
Return Type:
bool
// MinecraftServer.shouldInformAdmins() as bool;
myMinecraftServer . shouldInformAdmins();
Return Type:
bool
// MinecraftServer.spawnProtectionRadius as int
myMinecraftServer . spawnProtectionRadius
Return Type:
int
// MinecraftServer.spawnProtectionRadius() as int;
myMinecraftServer . spawnProtectionRadius();
Return Type:
int
// MinecraftServer.tickCount as int
myMinecraftServer . tickCount
Return Type:
int
// MinecraftServer.tickCount() as int;
myMinecraftServer . tickCount();
Return Type:
int