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>
,SnooperPopulator
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
private static int
private MinecraftServerGui
(package private) static org.apache.logging.log4j.Logger
private QueryThreadGs4
private RconConsoleSource
private RconThread
private Component
private DedicatedServerSettings
private static Pattern
private TextFilterClient
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, DEMO_SETTINGS, LEVEL_STORAGE_PROTOCOL, LEVEL_STORAGE_SCHEMA, MAP_RESOURCE_FILE, MS_PER_TICK, nextTickTime, playerDataStorage, proxy, registryHolder, START_CHUNK_RADIUS, storageSource, tickTimes, USERID_CACHE_FILE, worldData
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorDescriptionDedicatedServer(Thread p_139609_, RegistryAccess.RegistryHolder p_139610_, LevelStorageSource.LevelStorageAccess p_139611_, PackRepository p_139612_, ServerResources p_139613_, WorldData p_139614_, DedicatedServerSettings p_139615_, com.mojang.datafixers.DataFixer p_139616_, com.mojang.authlib.minecraft.MinecraftSessionService p_139617_, com.mojang.authlib.GameProfileRepository p_139618_, GameProfileCache p_139619_, ChunkProgressListenerFactory p_139620_)
-
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
isSingleplayerOwner(com.mojang.authlib.GameProfile p_139642_)
boolean
boolean
boolean
boolean
isUnderSpawnProtection(ServerLevel p_139630_, BlockPos p_139631_, Player p_139632_)
void
private static Component
parseResourcePackPrompt(DedicatedServerSettings p_142868_)
void
populateSnooper(Snooper p_139636_)
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, convertFromRegionFormatIfNeeded, createCommandSourceStack, createGameModeForPlayer, createLevels, detectBundledResources, doRunTask, fillSystemReport, finishRecordingMetrics, forgeGetWorldMap, getAdvancements, getAllLevels, getAverageTickTime, getCommands, getCommandStorage, getConnection, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFrameTimer, getFunctions, getGameRules, getItemModifierManager, getKeyPair, getLevel, getLocalIp, getLootTables, getMaxPlayers, 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, getSnooper, getSpawnRadius, getStatus, getStructureManager, getTags, getTickCount, getTickTime, getWorldData, getWorldPath, getWorldScreenshotFile, halt, initializeKeyPair, invalidateStatus, isDemo, isEnforceWhitelist, isFlightAllowed, isPvpAllowed, isReady, isRecordingMetrics, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, kickUnlistedPlayers, levelKeys, loadLevel, markWorldsDirty, onServerCrash, overworld, pollTask, populateSnooperInitial, publishServer, registryAccess, reloadResources, runServer, saveAllChunks, 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.apache.logging.log4j.Logger LOGGER -
CONVERSION_RETRY_DELAY_MS
private static final int CONVERSION_RETRY_DELAY_MS- See Also:
- Constant Field Values
-
CONVERSION_RETRIES
private static final int CONVERSION_RETRIES- See Also:
- Constant Field Values
-
SHA1
-
consoleInput
-
queryThreadGs4
-
rconConsoleSource
-
rconThread
-
settings
-
gui
-
textFilterClient
-
resourcePackPrompt
-
-
Constructor Details
-
DedicatedServer
public DedicatedServer(Thread p_139609_, RegistryAccess.RegistryHolder p_139610_, LevelStorageSource.LevelStorageAccess p_139611_, PackRepository p_139612_, ServerResources p_139613_, WorldData p_139614_, DedicatedServerSettings p_139615_, com.mojang.datafixers.DataFixer p_139616_, com.mojang.authlib.minecraft.MinecraftSessionService p_139617_, com.mojang.authlib.GameProfileRepository p_139618_, GameProfileCache p_139619_, ChunkProgressListenerFactory p_139620_)
-
-
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
-
getModdedStatus
- Specified by:
getModdedStatus
in classMinecraftServer
-
onServerExit
public void onServerExit()- Overrides:
onServerExit
in classMinecraftServer
-
tickChildren
- Overrides:
tickChildren
in classMinecraftServer
-
isNetherEnabled
public boolean isNetherEnabled()- Overrides:
isNetherEnabled
in classMinecraftServer
-
populateSnooper
- Specified by:
populateSnooper
in interfaceSnooperPopulator
- Overrides:
populateSnooper
in classMinecraftServer
-
isSnooperEnabled
public boolean isSnooperEnabled()- Specified by:
isSnooperEnabled
in interfaceSnooperPopulator
- Overrides:
isSnooperEnabled
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
-
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
-