Package net.minecraft.server.dedicated
Class DedicatedServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<R>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
net.minecraft.server.dedicated.DedicatedServer
- All Implemented Interfaces:
AutoCloseable
,Executor
,CommandSource
,ServerInterface
,ProfilerMeasured
,ProcessorHandle<TickTask>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources
-
Field Summary
Modifier and TypeFieldDescriptionfinal List<ConsoleInput>
private static final int
private static final int
private MinecraftServerGui
(package private) static final org.slf4j.Logger
private QueryThreadGs4
private final RconConsoleSource
private RconThread
private final Component
private final DedicatedServerSettings
private static final Pattern
private final TextFilterClient
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, LEVEL_STORAGE_PROTOCOL, LEVEL_STORAGE_SCHEMA, MAP_RESOURCE_FILE, MS_PER_TICK, nextTickTime, playerDataStorage, proxy, START_CHUNK_RADIUS, storageSource, tickTimes, USERID_CACHE_FILE, VANILLA_BRAND, worldData
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorDescriptionDedicatedServer
(Thread p_203713_, LevelStorageSource.LevelStorageAccess p_203714_, PackRepository p_203715_, WorldStem p_203716_, DedicatedServerSettings p_203717_, com.mojang.datafixers.DataFixer p_203718_, com.mojang.authlib.minecraft.MinecraftSessionService p_203719_, com.mojang.authlib.GameProfileRepository p_203720_, GameProfileCache p_203721_, ChunkProgressListenerFactory p_203722_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected boolean
createTextFilterForPlayer
(ServerPlayer p_139634_) void
dumpServerProperties
(Path p_142872_) fillServerSystemReport
(SystemReport p_142870_) void
boolean
int
int
int
long
int
int
int
getScaledTrackingDistance
(int p_139659_) int
int
void
handleConsoleInput
(String p_139646_, CommandSourceStack p_139647_) void
boolean
hasGui()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile p_139642_) boolean
boolean
boolean
isUnderSpawnProtection
(ServerLevel p_139630_, BlockPos p_139631_, Player p_139632_) void
private static Component
parseResourcePackPrompt
(DedicatedServerSettings p_142868_) boolean
runCommand
(String p_139644_) void
sendMessage
(Component message, UUID p_108776_) void
setPlayerIdleTimeout
(int p_139676_) boolean
boolean
void
showGui()
void
void
storeUsingWhiteList
(boolean p_139689_) void
tickChildren
(BooleanSupplier p_139661_) private void
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, addTickable, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, detectBundledResources, doRunTask, executeIfPossible, fillSystemReport, finishRecordingMetrics, forgeGetWorldMap, getAdvancements, getAllLevels, getAverageTickTime, getCommands, getCommandStorage, getConnection, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFrameTimer, getFunctions, getGameRules, getItemModifierManager, getKeyPair, getLevel, getLocalIp, getLootTables, getMaxPlayers, getModdedStatus, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerNames, getPort, getPredicateManager, getPreventProxyConnections, getProfileCache, getProfilePermissions, getProfiler, getProfileRepository, getProxy, getRecipeManager, getResourceManager, getResourcePack, getResourcePackHash, getRunningThread, getScoreboard, getServerDirectory, getServerModName, getServerResources, getServerVersion, getSessionService, getSingleplayerName, getSpawnRadius, getStatus, getStructureManager, getTickCount, getTickTime, getWorldData, getWorldPath, getWorldScreenshotFile, halt, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isPvpAllowed, isReady, isRecordingMetrics, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, kickUnlistedPlayers, levelKeys, loadLevel, markWorldsDirty, onServerCrash, overworld, pollTask, publishServer, registryAccess, reloadResources, runServer, saveAllChunks, saveEverything, scheduleExecutables, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setResourcePack, setSingleplayerName, setUsesAuthentication, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopTimeProfiler, tickServer, usesAuthentication, waitUntilNextTick, wrapRunnable
Methods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTask
Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell, waitForTasks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
Methods inherited from interface net.minecraft.server.ServerInterface
getMaxPlayers, getPlayerCount, getPlayerNames, getServerVersion
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
CONVERSION_RETRY_DELAY_MS
private static final int CONVERSION_RETRY_DELAY_MS- See Also:
-
CONVERSION_RETRIES
private static final int CONVERSION_RETRIES- See Also:
-
SHA1
-
consoleInput
-
queryThreadGs4
-
rconConsoleSource
-
rconThread
-
settings
-
gui
-
textFilterClient
-
resourcePackPrompt
-
-
Constructor Details
-
DedicatedServer
public DedicatedServer(Thread p_203713_, LevelStorageSource.LevelStorageAccess p_203714_, PackRepository p_203715_, WorldStem p_203716_, DedicatedServerSettings p_203717_, com.mojang.datafixers.DataFixer p_203718_, com.mojang.authlib.minecraft.MinecraftSessionService p_203719_, com.mojang.authlib.GameProfileRepository p_203720_, GameProfileCache p_203721_, ChunkProgressListenerFactory p_203722_)
-
-
Method Details
-
initServer
- Specified by:
initServer
in classMinecraftServer
- Throws:
IOException
-
isSpawningAnimals
public boolean isSpawningAnimals()- Overrides:
isSpawningAnimals
in classMinecraftServer
-
isSpawningMonsters
public boolean isSpawningMonsters()- Overrides:
isSpawningMonsters
in classMinecraftServer
-
areNpcsEnabled
public boolean areNpcsEnabled()- Overrides:
areNpcsEnabled
in classMinecraftServer
-
getPackHash
-
getProperties
- Specified by:
getProperties
in interfaceServerInterface
-
forceDifficulty
public void forceDifficulty()- Overrides:
forceDifficulty
in classMinecraftServer
-
isHardcore
public boolean isHardcore()- Overrides:
isHardcore
in classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReport
in classMinecraftServer
-
dumpServerProperties
- Overrides:
dumpServerProperties
in classMinecraftServer
- Throws:
IOException
-
onServerExit
public void onServerExit()- Overrides:
onServerExit
in classMinecraftServer
-
tickChildren
- Overrides:
tickChildren
in classMinecraftServer
-
isNetherEnabled
public boolean isNetherEnabled()- Overrides:
isNetherEnabled
in classMinecraftServer
-
handleConsoleInput
-
handleConsoleInputs
public void handleConsoleInputs() -
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServer
in classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecond
in classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabled
in classMinecraftServer
-
getPlayerList
- Overrides:
getPlayerList
in classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublished
in classMinecraftServer
-
getServerIp
- Specified by:
getServerIp
in interfaceServerInterface
-
getServerPort
public int getServerPort()- Specified by:
getServerPort
in interfaceServerInterface
-
getServerName
- Specified by:
getServerName
in interfaceServerInterface
-
showGui
public void showGui() -
hasGui
public boolean hasGui()- Overrides:
hasGui
in classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Specified by:
isCommandBlockEnabled
in classMinecraftServer
-
getSpawnProtectionRadius
public int getSpawnProtectionRadius()- Overrides:
getSpawnProtectionRadius
in classMinecraftServer
-
isUnderSpawnProtection
- Overrides:
isUnderSpawnProtection
in classMinecraftServer
-
repliesToStatus
public boolean repliesToStatus()- Overrides:
repliesToStatus
in classMinecraftServer
-
hidesOnlinePlayers
public boolean hidesOnlinePlayers()- Overrides:
hidesOnlinePlayers
in classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevel
in classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevel
in classMinecraftServer
-
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int p_139676_) - Overrides:
setPlayerIdleTimeout
in classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcast
in classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
- Specified by:
shouldInformAdmins
in classMinecraftServer
-
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize()- Overrides:
getAbsoluteMaxWorldSize
in classMinecraftServer
-
getCompressionThreshold
public int getCompressionThreshold()- Overrides:
getCompressionThreshold
in classMinecraftServer
-
convertOldUsers
protected boolean convertOldUsers() -
waitForRetry
private void waitForRetry() -
getMaxTickLength
public long getMaxTickLength() -
getPluginNames
- Specified by:
getPluginNames
in interfaceServerInterface
-
runCommand
- Specified by:
runCommand
in interfaceServerInterface
-
storeUsingWhiteList
public void storeUsingWhiteList(boolean p_139689_) -
stopServer
public void stopServer()- Overrides:
stopServer
in classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_139642_) - Specified by:
isSingleplayerOwner
in classMinecraftServer
-
sendMessage
- Specified by:
sendMessage
in interfaceCommandSource
- Overrides:
sendMessage
in classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_139659_) - Overrides:
getScaledTrackingDistance
in classMinecraftServer
-
getLevelIdName
- Specified by:
getLevelIdName
in interfaceServerInterface
-
forceSynchronousWrites
public boolean forceSynchronousWrites()- Overrides:
forceSynchronousWrites
in classMinecraftServer
-
createTextFilterForPlayer
- Overrides:
createTextFilterForPlayer
in classMinecraftServer
-
isResourcePackRequired
public boolean isResourcePackRequired()- Overrides:
isResourcePackRequired
in classMinecraftServer
-
getForcedGameType
- Overrides:
getForcedGameType
in classMinecraftServer
-
parseResourcePackPrompt
-
getResourcePackPrompt
- Overrides:
getResourcePackPrompt
in classMinecraftServer
-