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
,ProcessorHandle<TickTask>
,ChunkIOErrorReporter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo
-
Field Summary
Modifier and TypeFieldDescriptionfinal List
<ConsoleInput> private static final int
private static final int
private DebugSampleSubscriptionTracker
private LanServerPinger
private MinecraftServerGui
(package private) static final org.slf4j.Logger
private QueryThreadGs4
private final RconConsoleSource
private RconThread
private final ServerLinks
private final DedicatedServerSettings
private final TextFilterClient
private RemoteSampleLogger
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, tickTimesNanos, VANILLA_BRAND, worldData
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorDescriptionDedicatedServer
(Thread p_214789_, LevelStorageSource.LevelStorageAccess p_214790_, PackRepository p_214791_, WorldStem p_214792_, DedicatedServerSettings p_214793_, com.mojang.datafixers.DataFixer p_214794_, Services p_214795_, ChunkProgressListenerFactory p_214796_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
protected boolean
private static ServerLinks
createServerLinks
(DedicatedServerSettings p_343848_) createTextFilterForPlayer
(ServerPlayer p_139634_) void
dumpServerProperties
(Path p_142872_) void
boolean
fillServerSystemReport
(SystemReport p_142870_) void
boolean
int
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
isLevelEnabled
(Level p_344961_) boolean
boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile p_139642_) boolean
boolean
boolean
boolean
isUnderSpawnProtection
(ServerLevel p_139630_, BlockPos p_139631_, Player p_139632_) boolean
logIPs()
void
parseBugReportLink
(DedicatedServerProperties p_342981_) boolean
runCommand
(String p_139644_) void
setPlayerIdleTimeout
(int p_139676_) boolean
boolean
void
showGui()
void
void
storeUsingWhiteList
(boolean p_139689_) void
subscribeToDebugSample
(ServerPlayer p_328957_, RemoteDebugSampleType p_333036_) void
tickChildren
(BooleanSupplier p_139661_) private void
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, addTickable, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, doRunTask, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceTimeSynchronization, forgeGetWorldMap, 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, getProfiler, 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, 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, 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, tickRateManager, tickServer, usesAuthentication, waitForTasks, 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, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
reportMisplacedChunk
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.ServerInfo
getMaxPlayers, getMotd, getPlayerCount, getServerVersion
Methods inherited from interface net.minecraft.server.ServerInterface
getPlayerNames
-
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
-
textFilterClient
-
tickTimeLogger
-
debugSampleSubscriptionTracker
-
serverLinks
-
dediLanPinger
-
-
Constructor Details
-
DedicatedServer
public DedicatedServer(Thread p_214789_, LevelStorageSource.LevelStorageAccess p_214790_, PackRepository p_214791_, WorldStem p_214792_, DedicatedServerSettings p_214793_, com.mojang.datafixers.DataFixer p_214794_, Services p_214795_, ChunkProgressListenerFactory p_214796_)
-
-
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
-
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
-
isLevelEnabled
- Overrides:
isLevelEnabled
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
-
enforceSecureProfile
public boolean enforceSecureProfile()- Overrides:
enforceSecureProfile
in classMinecraftServer
-
logIPs
public boolean logIPs()- Overrides:
logIPs
in classMinecraftServer
-
convertOldUsers
protected boolean convertOldUsers() -
waitForRetry
private void waitForRetry() -
getMaxTickLength
public long getMaxTickLength() -
getMaxChainedNeighborUpdates
public int getMaxChainedNeighborUpdates()- Overrides:
getMaxChainedNeighborUpdates
in classMinecraftServer
-
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
-
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
-
getForcedGameType
- Overrides:
getForcedGameType
in classMinecraftServer
-
getServerResourcePack
- Overrides:
getServerResourcePack
in classMinecraftServer
-
endMetricsRecordingTick
public void endMetricsRecordingTick()- Overrides:
endMetricsRecordingTick
in classMinecraftServer
-
getTickTimeLogger
- Specified by:
getTickTimeLogger
in classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabled
in classMinecraftServer
-
subscribeToDebugSample
- Overrides:
subscribeToDebugSample
in classMinecraftServer
-
acceptsTransfers
public boolean acceptsTransfers()- Overrides:
acceptsTransfers
in classMinecraftServer
-
serverLinks
- Overrides:
serverLinks
in classMinecraftServer
-
createServerLinks
-
parseBugReportLink
-