Package net.minecraft.server.dedicated
Class DedicatedServer
- java.lang.Object
-
- net.minecraft.util.concurrent.ThreadTaskExecutor<R>
-
- net.minecraft.util.concurrent.RecursiveEventLoop<TickDelayedTask>
-
- net.minecraft.server.MinecraftServer
-
- net.minecraft.server.dedicated.DedicatedServer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.concurrent.Executor,ICommandSource,IServer,ISnooperInfo,ITaskExecutor<TickDelayedTask>
public class DedicatedServer extends MinecraftServer implements IServer
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<PendingCommand>consoleInputprivate MinecraftServerGuiguiprivate static org.apache.logging.log4j.LoggerLOGGERprivate QueryThreadqueryThreadGs4private RConConsoleSourcerconConsoleSourceprivate MainThreadrconThreadprivate ServerPropertiesProvidersettingsprivate static java.util.regex.PatternSHA1private ChatFilterClienttextFilterClient-
Fields inherited from class net.minecraft.server.MinecraftServer
DEMO_SETTINGS, nextTickTime, playerDataStorage, proxy, registryHolder, storageSource, tickTimes, USERID_CACHE_FILE, worldData
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description DedicatedServer(java.lang.Thread p_i232601_1_, DynamicRegistries.Impl p_i232601_2_, SaveFormat.LevelSave p_i232601_3_, ResourcePackList p_i232601_4_, DataPackRegistries p_i232601_5_, IServerConfiguration p_i232601_6_, ServerPropertiesProvider p_i232601_7_, com.mojang.datafixers.DataFixer p_i232601_8_, com.mojang.authlib.minecraft.MinecraftSessionService p_i232601_9_, com.mojang.authlib.GameProfileRepository p_i232601_10_, PlayerProfileCache p_i232601_11_, IChunkStatusListenerFactory p_i232601_12_)
-
Method Summary
-
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, addTickable, close, configurePackRepository, convertFromRegionFormatIfNeeded, createCommandSourceStack, createLevels, detectBundledResources, doRunTask, finishProfiling, forgeGetWorldMap, getAdvancements, getAllLevels, getAverageTickTime, getCommands, getCommandStorage, getConnection, getCustomBossEvents, getDataPackRegistries, getDefaultGameType, getFile, getFixerUpper, getForceGameType, getFrameTimer, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getLootTables, getMaxBuildHeight, getMaxPlayers, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerNames, getPort, getPredicateManager, getPreventProxyConnections, getProfileCache, getProfilePermissions, getProfiler, getProfileRepository, getRecipeManager, getResourcePack, getResourcePackHash, getRunningThread, getScoreboard, getServerDirectory, getServerModName, getServerVersion, getSessionService, getSingleplayerName, getSnooper, getSpawnRadius, getStatus, getStructureManager, getTags, getTickCount, getTickTime, getWorldData, getWorldPath, getWorldScreenshotFile, halt, hasWorldScreenshot, initializeKeyPair, invalidateStatus, isDemo, isEnforceWhitelist, isFlightAllowed, isProfiling, isPvpAllowed, isReady, isRunning, isShutdown, isSingleplayer, isStopped, kickUnlistedPlayers, levelKeys, loadLevel, markWorldsDirty, onServerCrash, overworld, pollTask, registryAccess, reloadResources, runServer, saveAllChunks, saveDebugReport, scheduleExecutables, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightAllowed, setForceGameType, setId, setLocalIp, setMaxBuildHeight, setMotd, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setResourcePack, setSingleplayerName, setUsesAuthentication, shouldRun, spin, startProfiling, tickServer, usesAuthentication, waitUntilNextTick, wrapRunnable
-
Methods inherited from class net.minecraft.util.concurrent.RecursiveEventLoop
runningTask
-
Methods inherited from class net.minecraft.util.concurrent.ThreadTaskExecutor
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, 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.network.rcon.IServer
getMaxPlayers, getPlayerCount, getPlayerNames, getServerVersion
-
Methods inherited from interface net.minecraft.util.concurrent.ITaskExecutor
ask, askEither
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
SHA1
private static final java.util.regex.Pattern SHA1
-
consoleInput
public final java.util.List<PendingCommand> consoleInput
-
queryThreadGs4
private QueryThread queryThreadGs4
-
rconConsoleSource
private final RConConsoleSource rconConsoleSource
-
rconThread
private MainThread rconThread
-
settings
private final ServerPropertiesProvider settings
-
gui
@Nullable private MinecraftServerGui gui
-
textFilterClient
@Nullable private final ChatFilterClient textFilterClient
-
-
Constructor Detail
-
DedicatedServer
public DedicatedServer(java.lang.Thread p_i232601_1_, DynamicRegistries.Impl p_i232601_2_, SaveFormat.LevelSave p_i232601_3_, ResourcePackList p_i232601_4_, DataPackRegistries p_i232601_5_, IServerConfiguration p_i232601_6_, ServerPropertiesProvider p_i232601_7_, com.mojang.datafixers.DataFixer p_i232601_8_, com.mojang.authlib.minecraft.MinecraftSessionService p_i232601_9_, com.mojang.authlib.GameProfileRepository p_i232601_10_, PlayerProfileCache p_i232601_11_, IChunkStatusListenerFactory p_i232601_12_)
-
-
Method Detail
-
initServer
public boolean initServer() throws java.io.IOException- Specified by:
initServerin classMinecraftServer- Throws:
java.io.IOException
-
isSpawningAnimals
public boolean isSpawningAnimals()
- Overrides:
isSpawningAnimalsin classMinecraftServer
-
isSpawningMonsters
public boolean isSpawningMonsters()
- Overrides:
isSpawningMonstersin classMinecraftServer
-
areNpcsEnabled
public boolean areNpcsEnabled()
- Overrides:
areNpcsEnabledin classMinecraftServer
-
getPackHash
public java.lang.String getPackHash()
-
getProperties
public ServerProperties getProperties()
- Specified by:
getPropertiesin interfaceIServer
-
forceDifficulty
public void forceDifficulty()
- Overrides:
forceDifficultyin classMinecraftServer
-
isHardcore
public boolean isHardcore()
- Overrides:
isHardcorein classMinecraftServer
-
fillReport
public CrashReport fillReport(CrashReport p_71230_1_)
- Overrides:
fillReportin classMinecraftServer
-
getModdedStatus
public java.util.Optional<java.lang.String> getModdedStatus()
- Specified by:
getModdedStatusin classMinecraftServer
-
onServerExit
public void onServerExit()
- Overrides:
onServerExitin classMinecraftServer
-
tickChildren
public void tickChildren(java.util.function.BooleanSupplier p_71190_1_)
- Overrides:
tickChildrenin classMinecraftServer
-
isNetherEnabled
public boolean isNetherEnabled()
- Overrides:
isNetherEnabledin classMinecraftServer
-
populateSnooper
public void populateSnooper(Snooper p_70000_1_)
- Specified by:
populateSnooperin interfaceISnooperInfo- Overrides:
populateSnooperin classMinecraftServer
-
handleConsoleInput
public void handleConsoleInput(java.lang.String p_195581_1_, CommandSource p_195581_2_)
-
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
public DedicatedPlayerList getPlayerList()
- Overrides:
getPlayerListin classMinecraftServer
-
isPublished
public boolean isPublished()
- Specified by:
isPublishedin classMinecraftServer
-
getServerIp
public java.lang.String getServerIp()
- Specified by:
getServerIpin interfaceIServer
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfaceIServer
-
getServerName
public java.lang.String getServerName()
- Specified by:
getServerNamein interfaceIServer
-
showGui
public void showGui()
-
hasGui
public boolean hasGui()
- Overrides:
hasGuiin classMinecraftServer
-
publishServer
public boolean publishServer(GameType p_195565_1_, boolean p_195565_2_, int p_195565_3_)
- Specified by:
publishServerin classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()
- Specified by:
isCommandBlockEnabledin classMinecraftServer
-
getSpawnProtectionRadius
public int getSpawnProtectionRadius()
- Overrides:
getSpawnProtectionRadiusin classMinecraftServer
-
isUnderSpawnProtection
public boolean isUnderSpawnProtection(ServerWorld p_175579_1_, BlockPos p_175579_2_, PlayerEntity p_175579_3_)
- 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_143006_1_)
- Overrides:
setPlayerIdleTimeoutin classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()
- Specified by:
shouldRconBroadcastin classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()
- Specified by:
shouldInformAdminsin interfaceICommandSource
-
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
public java.lang.String getPluginNames()
- Specified by:
getPluginNamesin interfaceIServer
-
runCommand
public java.lang.String runCommand(java.lang.String p_71252_1_)
- Specified by:
runCommandin interfaceIServer
-
storeUsingWhiteList
public void storeUsingWhiteList(boolean p_213223_1_)
-
stopServer
public void stopServer()
- Overrides:
stopServerin classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_213199_1_)
- Specified by:
isSingleplayerOwnerin classMinecraftServer
-
sendMessage
public void sendMessage(ITextComponent message, java.util.UUID p_145747_2_)
- Specified by:
sendMessagein interfaceICommandSource- Overrides:
sendMessagein classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_230512_1_)
- Overrides:
getScaledTrackingDistancein classMinecraftServer
-
getLevelIdName
public java.lang.String getLevelIdName()
- Specified by:
getLevelIdNamein interfaceIServer
-
forceSynchronousWrites
public boolean forceSynchronousWrites()
- Overrides:
forceSynchronousWritesin classMinecraftServer
-
createTextFilterForPlayer
@Nullable public IChatFilter createTextFilterForPlayer(ServerPlayerEntity p_244435_1_)
- Overrides:
createTextFilterForPlayerin classMinecraftServer
-
-