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, MinecraftServer.ServerResourcePackInfo
-
Field Summary
Modifier and TypeFieldDescriptionfinal List<ConsoleInput>
private static final int
private static final int
private LanServerPinger
private MinecraftServerGui
(package private) static final org.slf4j.Logger
private QueryThreadGs4
private final RconConsoleSource
private RconThread
private final DedicatedServerSettings
private final TextFilterClient
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, MS_PER_TICK, nextTickTime, playerDataStorage, proxy, services, START_CHUNK_RADIUS, storageSource, tickTimes, 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
protected boolean
createTextFilterForPlayer
(ServerPlayer p_139634_) void
dumpServerProperties
(Path p_142872_) 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
boolean
boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile p_139642_) boolean
boolean
boolean
isUnderSpawnProtection
(ServerLevel p_139630_, BlockPos p_139631_, Player p_139632_) void
boolean
runCommand
(String p_139644_) 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, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, doRunTask, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceTimeSynchronization, forgeGetWorldMap, getAdvancements, getAllLevels, getAverageTickTime, getChatDecorator, getCommands, getCommandStorage, getConnection, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFrameTimer, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getLootData, 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, getWorldData, getWorldPath, getWorldScreenshotFile, halt, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, markWorldsDirty, onServerCrash, overworld, pollTask, publishServer, registries, registryAccess, reloadResources, runServer, saveAllChunks, saveEverything, scheduleExecutables, sendSystemMessage, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setSingleplayerProfile, 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:
-
consoleInput
-
queryThreadGs4
-
rconConsoleSource
-
rconThread
-
settings
-
gui
-
textFilterClient
-
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
-
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
-
enforceSecureProfile
public boolean enforceSecureProfile()- Overrides:
enforceSecureProfile
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
-