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
FieldsModifier and TypeFieldDescriptionprivate static intprivate static intprivate MinecraftServerGui(package private) static org.apache.logging.log4j.Loggerprivate QueryThreadGs4private RconConsoleSourceprivate RconThreadprivate Componentprivate DedicatedServerSettingsprivate static Patternprivate TextFilterClientFields 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, worldDataFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionDedicatedServer(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 TypeMethodDescriptionbooleanprotected booleancreateTextFilterForPlayer(ServerPlayer p_139634_)voiddumpServerProperties(Path p_142872_)fillServerSystemReport(SystemReport p_142870_)voidbooleanintintintlongintintintgetScaledTrackingDistance(int p_139659_)intintvoidhandleConsoleInput(String p_139646_, CommandSourceStack p_139647_)voidbooleanhasGui()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSingleplayerOwner(com.mojang.authlib.GameProfile p_139642_)booleanbooleanbooleanbooleanisUnderSpawnProtection(ServerLevel p_139630_, BlockPos p_139631_, Player p_139632_)voidprivate static ComponentparseResourcePackPrompt(DedicatedServerSettings p_142868_)voidpopulateSnooper(Snooper p_139636_)booleanrunCommand(String p_139644_)voidsendMessage(Component message, UUID p_108776_)voidsetPlayerIdleTimeout(int p_139676_)booleanbooleanvoidshowGui()voidvoidstoreUsingWhiteList(boolean p_139689_)voidtickChildren(BooleanSupplier p_139661_)private voidMethods 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, wrapRunnableMethods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell, waitForTasksMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEitherMethods 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:
initServerin classMinecraftServer- Throws:
IOException
-
isSpawningAnimals
public boolean isSpawningAnimals()- Overrides:
isSpawningAnimalsin classMinecraftServer
-
isSpawningMonsters
public boolean isSpawningMonsters()- Overrides:
isSpawningMonstersin classMinecraftServer
-
areNpcsEnabled
public boolean areNpcsEnabled()- Overrides:
areNpcsEnabledin classMinecraftServer
-
getPackHash
-
getProperties
- Specified by:
getPropertiesin interfaceServerInterface
-
forceDifficulty
public void forceDifficulty()- Overrides:
forceDifficultyin classMinecraftServer
-
isHardcore
public boolean isHardcore()- Overrides:
isHardcorein classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReportin classMinecraftServer
-
dumpServerProperties
- Overrides:
dumpServerPropertiesin classMinecraftServer- Throws:
IOException
-
getModdedStatus
- Specified by:
getModdedStatusin classMinecraftServer
-
onServerExit
public void onServerExit()- Overrides:
onServerExitin classMinecraftServer
-
tickChildren
- Overrides:
tickChildrenin classMinecraftServer
-
isNetherEnabled
public boolean isNetherEnabled()- Overrides:
isNetherEnabledin classMinecraftServer
-
populateSnooper
- Specified by:
populateSnooperin interfaceSnooperPopulator- Overrides:
populateSnooperin classMinecraftServer
-
isSnooperEnabled
public boolean isSnooperEnabled()- Specified by:
isSnooperEnabledin interfaceSnooperPopulator- Overrides:
isSnooperEnabledin classMinecraftServer
-
handleConsoleInput
-
handleConsoleInputs
public void handleConsoleInputs() -
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServerin classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecondin classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabledin classMinecraftServer
-
getPlayerList
- Overrides:
getPlayerListin classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublishedin classMinecraftServer
-
getServerIp
- Specified by:
getServerIpin interfaceServerInterface
-
getServerPort
public int getServerPort()- Specified by:
getServerPortin interfaceServerInterface
-
getServerName
- Specified by:
getServerNamein interfaceServerInterface
-
showGui
public void showGui() -
hasGui
public boolean hasGui()- Overrides:
hasGuiin classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Specified by:
isCommandBlockEnabledin classMinecraftServer
-
getSpawnProtectionRadius
public int getSpawnProtectionRadius()- Overrides:
getSpawnProtectionRadiusin classMinecraftServer
-
isUnderSpawnProtection
- Overrides:
isUnderSpawnProtectionin classMinecraftServer
-
repliesToStatus
public boolean repliesToStatus()- Overrides:
repliesToStatusin classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevelin classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevelin classMinecraftServer
-
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int p_139676_)- Overrides:
setPlayerIdleTimeoutin classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcastin classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource- Specified by:
shouldInformAdminsin classMinecraftServer
-
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize()- Overrides:
getAbsoluteMaxWorldSizein classMinecraftServer
-
getCompressionThreshold
public int getCompressionThreshold()- Overrides:
getCompressionThresholdin classMinecraftServer
-
convertOldUsers
protected boolean convertOldUsers() -
waitForRetry
private void waitForRetry() -
getMaxTickLength
public long getMaxTickLength() -
getPluginNames
- Specified by:
getPluginNamesin interfaceServerInterface
-
runCommand
- Specified by:
runCommandin interfaceServerInterface
-
storeUsingWhiteList
public void storeUsingWhiteList(boolean p_139689_) -
stopServer
public void stopServer()- Overrides:
stopServerin classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_139642_)- Specified by:
isSingleplayerOwnerin classMinecraftServer
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSource- Overrides:
sendMessagein classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_139659_)- Overrides:
getScaledTrackingDistancein classMinecraftServer
-
getLevelIdName
- Specified by:
getLevelIdNamein interfaceServerInterface
-
forceSynchronousWrites
public boolean forceSynchronousWrites()- Overrides:
forceSynchronousWritesin classMinecraftServer
-
createTextFilterForPlayer
- Overrides:
createTextFilterForPlayerin classMinecraftServer
-
isResourcePackRequired
public boolean isResourcePackRequired()- Overrides:
isResourcePackRequiredin classMinecraftServer
-
getForcedGameType
- Overrides:
getForcedGameTypein classMinecraftServer
-
parseResourcePackPrompt
-
getResourcePackPrompt
- Overrides:
getResourcePackPromptin classMinecraftServer
-