Class ExpandServer
java.lang.Object
com.blamejared.crafttweaker.natives.game.ExpandServer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareNpcsEnabled(net.minecraft.server.MinecraftServer internal) static intexecuteCommand(net.minecraft.server.MinecraftServer internal, String command, boolean silent) Runs a command, if silent is true, the output is hidden.static intexecuteCommand(net.minecraft.server.MinecraftServer internal, String command, net.minecraft.world.entity.player.Player player, boolean silent) let a player send a command, if silent is true, the output is hidden.static intgetAbsoluteMaxWorldSize(net.minecraft.server.MinecraftServer internal) static Iterable<net.minecraft.server.level.ServerLevel>getAllLevels(net.minecraft.server.MinecraftServer internal) static floatgetAverageTickTime(net.minecraft.server.MinecraftServer internal) static net.minecraft.world.level.GameTypegetDefaultGameType(net.minecraft.server.MinecraftServer internal) static net.minecraft.world.level.GameTypegetForcedGameType(net.minecraft.server.MinecraftServer internal) static net.minecraft.server.level.ServerLevelgetLevel(net.minecraft.server.MinecraftServer internal, net.minecraft.resources.ResourceLocation location) static intgetMaxPlayers(net.minecraft.server.MinecraftServer internal) static StringgetModdedStatus(net.minecraft.server.MinecraftServer internal) static StringgetMotd(net.minecraft.server.MinecraftServer internal) static intgetOperatorUserPermissionLevel(net.minecraft.server.MinecraftServer internal) static CraftTweakerSavedDatagetOverworldData(net.minecraft.server.MinecraftServer internal) Gets the custom data of the overworld.static intgetPlayerCount(net.minecraft.server.MinecraftServer internal) static String[]getPlayerNames(net.minecraft.server.MinecraftServer internal) static StringgetServerModName(net.minecraft.server.MinecraftServer internal) static StringgetServerVersion(net.minecraft.server.MinecraftServer internal) static intgetSpawnProtectionRadius(net.minecraft.server.MinecraftServer internal) static intgetSpawnRadius(net.minecraft.server.MinecraftServer internal, net.minecraft.server.level.ServerLevel level) static intgetTickCount(net.minecraft.server.MinecraftServer internal) static booleanisCommandBlockEnabled(net.minecraft.server.MinecraftServer internal) static booleanisDedicatedServer(net.minecraft.server.MinecraftServer internal) static booleanisEnforceWhitelist(net.minecraft.server.MinecraftServer internal) static booleanisFlightAllowed(net.minecraft.server.MinecraftServer internal) static booleanisHardcore(net.minecraft.server.MinecraftServer internal) static booleanisNetherEnabled(net.minecraft.server.MinecraftServer internal) static booleanisPvpAllowed(net.minecraft.server.MinecraftServer internal) static booleanisReady(net.minecraft.server.MinecraftServer internal) static booleanisRunning(net.minecraft.server.MinecraftServer internal) static booleanisShutdown(net.minecraft.server.MinecraftServer internal) static booleanisSingleplayer(net.minecraft.server.MinecraftServer internal) static booleanisSpawningAnimals(net.minecraft.server.MinecraftServer internal) static booleanisSpawningMonsters(net.minecraft.server.MinecraftServer internal) static booleanisStopped(net.minecraft.server.MinecraftServer internal) static booleanisUnderSpawnProtection(net.minecraft.server.MinecraftServer internal, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) static List<net.minecraft.resources.ResourceLocation>levelKeys(net.minecraft.server.MinecraftServer internal) static net.minecraft.server.level.ServerLeveloverworld(net.minecraft.server.MinecraftServer internal) static voidsetDefaultGameType(net.minecraft.server.MinecraftServer internal, net.minecraft.world.level.GameType gameType) static voidsetDifficulty(net.minecraft.server.MinecraftServer internal, net.minecraft.world.Difficulty difficulty, boolean force) static voidsetDifficultyLocked(net.minecraft.server.MinecraftServer internal, boolean locked) static voidsetEnforceWhitelist(net.minecraft.server.MinecraftServer internal, boolean enforceWhitelist) static voidsetFlightAllowed(net.minecraft.server.MinecraftServer internal, boolean flightAllowed) static voidstatic voidsetPvpAllowed(net.minecraft.server.MinecraftServer internal, boolean pvpAllowed)
-
Constructor Details
-
ExpandServer
public ExpandServer()
-
-
Method Details
-
getOverworldData
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.
-
getDefaultGameType
public static net.minecraft.world.level.GameType getDefaultGameType(net.minecraft.server.MinecraftServer internal) -
isHardcore
public static boolean isHardcore(net.minecraft.server.MinecraftServer internal) -
getOperatorUserPermissionLevel
public static int getOperatorUserPermissionLevel(net.minecraft.server.MinecraftServer internal) -
isRunning
public static boolean isRunning(net.minecraft.server.MinecraftServer internal) -
isNetherEnabled
public static boolean isNetherEnabled(net.minecraft.server.MinecraftServer internal) -
isShutdown
public static boolean isShutdown(net.minecraft.server.MinecraftServer internal) -
overworld
public static net.minecraft.server.level.ServerLevel overworld(net.minecraft.server.MinecraftServer internal) -
getLevel
public static net.minecraft.server.level.ServerLevel getLevel(net.minecraft.server.MinecraftServer internal, net.minecraft.resources.ResourceLocation location) -
levelKeys
public static List<net.minecraft.resources.ResourceLocation> levelKeys(net.minecraft.server.MinecraftServer internal) -
getAllLevels
public static Iterable<net.minecraft.server.level.ServerLevel> getAllLevels(net.minecraft.server.MinecraftServer internal) -
getServerVersion
-
getPlayerCount
public static int getPlayerCount(net.minecraft.server.MinecraftServer internal) -
getMaxPlayers
public static int getMaxPlayers(net.minecraft.server.MinecraftServer internal) -
getPlayerNames
-
getServerModName
-
getModdedStatus
-
isSingleplayer
public static boolean isSingleplayer(net.minecraft.server.MinecraftServer internal) -
setDifficulty
public static void setDifficulty(net.minecraft.server.MinecraftServer internal, net.minecraft.world.Difficulty difficulty, boolean force) -
setDifficultyLocked
public static void setDifficultyLocked(net.minecraft.server.MinecraftServer internal, boolean locked) -
isSpawningMonsters
public static boolean isSpawningMonsters(net.minecraft.server.MinecraftServer internal) -
isDedicatedServer
public static boolean isDedicatedServer(net.minecraft.server.MinecraftServer internal) -
isSpawningAnimals
public static boolean isSpawningAnimals(net.minecraft.server.MinecraftServer internal) -
areNpcsEnabled
public static boolean areNpcsEnabled(net.minecraft.server.MinecraftServer internal) -
isPvpAllowed
public static boolean isPvpAllowed(net.minecraft.server.MinecraftServer internal) -
setPvpAllowed
public static void setPvpAllowed(net.minecraft.server.MinecraftServer internal, boolean pvpAllowed) -
isFlightAllowed
public static boolean isFlightAllowed(net.minecraft.server.MinecraftServer internal) -
setFlightAllowed
public static void setFlightAllowed(net.minecraft.server.MinecraftServer internal, boolean flightAllowed) -
isCommandBlockEnabled
public static boolean isCommandBlockEnabled(net.minecraft.server.MinecraftServer internal) -
getMotd
-
setMotd
-
isStopped
public static boolean isStopped(net.minecraft.server.MinecraftServer internal) -
setDefaultGameType
public static void setDefaultGameType(net.minecraft.server.MinecraftServer internal, net.minecraft.world.level.GameType gameType) -
isReady
public static boolean isReady(net.minecraft.server.MinecraftServer internal) -
getTickCount
public static int getTickCount(net.minecraft.server.MinecraftServer internal) -
getSpawnProtectionRadius
public static int getSpawnProtectionRadius(net.minecraft.server.MinecraftServer internal) -
isUnderSpawnProtection
public static boolean isUnderSpawnProtection(net.minecraft.server.MinecraftServer internal, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) -
getAbsoluteMaxWorldSize
public static int getAbsoluteMaxWorldSize(net.minecraft.server.MinecraftServer internal) -
getSpawnRadius
public static int getSpawnRadius(net.minecraft.server.MinecraftServer internal, net.minecraft.server.level.ServerLevel level) -
isEnforceWhitelist
public static boolean isEnforceWhitelist(net.minecraft.server.MinecraftServer internal) -
setEnforceWhitelist
public static void setEnforceWhitelist(net.minecraft.server.MinecraftServer internal, boolean enforceWhitelist) -
getAverageTickTime
public static float getAverageTickTime(net.minecraft.server.MinecraftServer internal) -
getForcedGameType
public static net.minecraft.world.level.GameType getForcedGameType(net.minecraft.server.MinecraftServer internal) -
executeCommand
public static int executeCommand(net.minecraft.server.MinecraftServer internal, String command, boolean silent) 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
- DocParam:
- command "time set day", silent true
-
executeCommand
public static int executeCommand(net.minecraft.server.MinecraftServer internal, String command, net.minecraft.world.entity.player.Player player, boolean silent) 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
- DocParam:
- command "time set day", player player, silent true
-