Package net.minecraft.server.dedicated
Class DedicatedServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
net.minecraft.server.dedicated.DedicatedServer
- All Implemented Interfaces:
AutoCloseable,Executor,CommandSource,ServerInfo,ServerInterface,ProfilerMeasured,TaskScheduler<TickTask>,ChunkIOErrorReporter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ConsoleInput> private static final intprivate static final intprivate DebugSampleSubscriptionTrackerprivate LanServerPingerprivate MinecraftServerGui(package private) static final org.slf4j.Loggerprivate QueryThreadGs4private final RconConsoleSourceprivate RconThreadprivate final ServerLinksprivate final ServerTextFilterprivate final DedicatedServerSettingsprivate RemoteSampleLoggerFields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldDataFields inherited from class net.minecraft.util.thread.BlockableEventLoop
BLOCK_TIME_NANOSFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionDedicatedServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, DedicatedServerSettings pSettings, com.mojang.datafixers.DataFixer pFixerUpper, Services pServices, ChunkProgressListenerFactory pProgressListenerFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleanprivate static ServerLinkscreateServerLinks(DedicatedServerSettings pSettings) createTextFilterForPlayer(ServerPlayer p_139634_) voiddumpServerProperties(Path p_142872_) voidbooleanfillServerSystemReport(SystemReport p_142870_) voidbooleanintintintintlongintintintgetScaledTrackingDistance(int p_139659_) intintvoidhandleConsoleInput(String pMsg, CommandSourceStack pSource) voidbooleanhasGui()booleanbooleanbooleanbooleanbooleanbooleanisLevelEnabled(Level p_350654_) booleanbooleanisSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) booleanbooleanbooleanisUnderSpawnProtection(ServerLevel pLevel, BlockPos pPos, Player pPlayer) booleanlogIPs()voidparseBugReportLink(DedicatedServerProperties pProperties) intbooleanrunCommand(String pCommand) Handle a command received by an RCon instancevoidsetPlayerIdleTimeout(int pIdleTimeout) booleanbooleanvoidshowGui()voidvoidstoreUsingWhiteList(boolean pIsStoreUsingWhiteList) voidsubscribeToDebugSample(ServerPlayer p_324272_, RemoteDebugSampleType p_324213_) voidprivate voidMethods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, addTickable, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, doRunTask, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceTimeSynchronization, forgeGetWorldMap, fuelValues, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCommands, getCommandStorage, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getMaxPlayers, getModdedStatus, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerNames, getPort, getPreventProxyConnections, getProfileCache, getProfileKeySignatureValidator, getProfilePermissions, getProfileRepository, getProxy, getRecipeManager, getResourceManager, getRunningThread, getScoreboard, getServerDirectory, getServerModName, getServerResources, getServerVersion, getSessionService, getSingleplayerProfile, getSpawnRadius, getStatus, getStatusJson, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, halt, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isHardcore, isPaused, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, managedBlock, markWorldsDirty, onServerCrash, onTickRateChanged, overworld, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, reportChunkLoadFailure, reportChunkSaveFailure, reportPacketHandlingException, runServer, saveAllChunks, saveEverything, scheduleExecutables, sendSystemMessage, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setSingleplayerProfile, setUsesAuthentication, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopTimeProfiler, throwIfFatalException, tickChildren, tickRateManager, tickServer, usesAuthentication, waitForTasks, waitUntilNextTick, wrapRunnableMethods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isNonRecoverable, isSameThread, name, profiledMetrics, runAllTasks, schedule, submit, submit, submitAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
reportMisplacedChunkMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraft.server.ServerInfo
getMaxPlayers, getMotd, getPlayerCount, getServerVersionMethods inherited from interface net.minecraft.server.ServerInterface
getPlayerNamesMethods inherited from interface net.minecraft.util.thread.TaskScheduler
scheduleWithResult
-
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:
-
consoleInput
-
queryThreadGs4
-
rconConsoleSource
-
rconThread
-
settings
-
gui
-
serverTextFilter
-
tickTimeLogger
-
debugSampleSubscriptionTracker
-
serverLinks
-
dediLanPinger
-
-
Constructor Details
-
DedicatedServer
public DedicatedServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, DedicatedServerSettings pSettings, com.mojang.datafixers.DataFixer pFixerUpper, Services pServices, ChunkProgressListenerFactory pProgressListenerFactory)
-
-
Method Details
-
initServer
- Specified by:
initServerin classMinecraftServer- Throws:
IOException
-
isSpawningMonsters
public boolean isSpawningMonsters()- Overrides:
isSpawningMonstersin classMinecraftServer
-
getProperties
- Specified by:
getPropertiesin interfaceServerInterface
-
forceDifficulty
public void forceDifficulty()- Overrides:
forceDifficultyin classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReportin classMinecraftServer
-
dumpServerProperties
- Overrides:
dumpServerPropertiesin classMinecraftServer- Throws:
IOException
-
onServerExit
public void onServerExit()- Overrides:
onServerExitin classMinecraftServer
-
tickConnection
public void tickConnection()- Overrides:
tickConnectionin classMinecraftServer
-
isLevelEnabled
- Overrides:
isLevelEnabledin 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
-
hidesOnlinePlayers
public boolean hidesOnlinePlayers()- Overrides:
hidesOnlinePlayersin classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevelin classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevelin classMinecraftServer
-
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int pIdleTimeout) - 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
-
enforceSecureProfile
public boolean enforceSecureProfile()- Overrides:
enforceSecureProfilein classMinecraftServer
-
logIPs
public boolean logIPs()- Overrides:
logIPsin classMinecraftServer
-
convertOldUsers
protected boolean convertOldUsers() -
waitForRetry
private void waitForRetry() -
getMaxTickLength
public long getMaxTickLength() -
getMaxChainedNeighborUpdates
public int getMaxChainedNeighborUpdates()- Overrides:
getMaxChainedNeighborUpdatesin classMinecraftServer
-
getPluginNames
- Specified by:
getPluginNamesin interfaceServerInterface
-
runCommand
Handle a command received by an RCon instance- Specified by:
runCommandin interfaceServerInterface
-
storeUsingWhiteList
public void storeUsingWhiteList(boolean pIsStoreUsingWhiteList) -
stopServer
public void stopServer()- Overrides:
stopServerin classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) - Specified by:
isSingleplayerOwnerin 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
-
getForcedGameType
- Overrides:
getForcedGameTypein classMinecraftServer
-
getServerResourcePack
- Overrides:
getServerResourcePackin classMinecraftServer
-
endMetricsRecordingTick
public void endMetricsRecordingTick()- Overrides:
endMetricsRecordingTickin classMinecraftServer
-
getTickTimeLogger
- Specified by:
getTickTimeLoggerin classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabledin classMinecraftServer
-
subscribeToDebugSample
- Overrides:
subscribeToDebugSamplein classMinecraftServer
-
acceptsTransfers
public boolean acceptsTransfers()- Overrides:
acceptsTransfersin classMinecraftServer
-
serverLinks
- Overrides:
serverLinksin classMinecraftServer
-
pauseWhileEmptySeconds
public int pauseWhileEmptySeconds()- Overrides:
pauseWhileEmptySecondsin classMinecraftServer
-
createServerLinks
-
parseBugReportLink
-