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>
consoleInput
private MinecraftServerGui
gui
private static org.apache.logging.log4j.Logger
LOGGER
private QueryThread
queryThreadGs4
private RConConsoleSource
rconConsoleSource
private MainThread
rconThread
private ServerPropertiesProvider
settings
private static java.util.regex.Pattern
SHA1
private ChatFilterClient
textFilterClient
-
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:
initServer
in classMinecraftServer
- Throws:
java.io.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
-
getPackHash
public java.lang.String getPackHash()
-
getProperties
public ServerProperties getProperties()
- Specified by:
getProperties
in interfaceIServer
-
forceDifficulty
public void forceDifficulty()
- Overrides:
forceDifficulty
in classMinecraftServer
-
isHardcore
public boolean isHardcore()
- Overrides:
isHardcore
in classMinecraftServer
-
fillReport
public CrashReport fillReport(CrashReport p_71230_1_)
- Overrides:
fillReport
in classMinecraftServer
-
getModdedStatus
public java.util.Optional<java.lang.String> getModdedStatus()
- Specified by:
getModdedStatus
in classMinecraftServer
-
onServerExit
public void onServerExit()
- Overrides:
onServerExit
in classMinecraftServer
-
tickChildren
public void tickChildren(java.util.function.BooleanSupplier p_71190_1_)
- Overrides:
tickChildren
in classMinecraftServer
-
isNetherEnabled
public boolean isNetherEnabled()
- Overrides:
isNetherEnabled
in classMinecraftServer
-
populateSnooper
public void populateSnooper(Snooper p_70000_1_)
- Specified by:
populateSnooper
in interfaceISnooperInfo
- Overrides:
populateSnooper
in 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:
isDedicatedServer
in classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()
- Specified by:
getRateLimitPacketsPerSecond
in classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()
- Specified by:
isEpollEnabled
in classMinecraftServer
-
getPlayerList
public DedicatedPlayerList getPlayerList()
- Overrides:
getPlayerList
in classMinecraftServer
-
isPublished
public boolean isPublished()
- Specified by:
isPublished
in classMinecraftServer
-
getServerIp
public java.lang.String getServerIp()
- Specified by:
getServerIp
in interfaceIServer
-
getServerPort
public int getServerPort()
- Specified by:
getServerPort
in interfaceIServer
-
getServerName
public java.lang.String getServerName()
- Specified by:
getServerName
in interfaceIServer
-
showGui
public void showGui()
-
hasGui
public boolean hasGui()
- Overrides:
hasGui
in classMinecraftServer
-
publishServer
public boolean publishServer(GameType p_195565_1_, boolean p_195565_2_, int p_195565_3_)
- Specified by:
publishServer
in classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()
- Specified by:
isCommandBlockEnabled
in classMinecraftServer
-
getSpawnProtectionRadius
public int getSpawnProtectionRadius()
- Overrides:
getSpawnProtectionRadius
in classMinecraftServer
-
isUnderSpawnProtection
public boolean isUnderSpawnProtection(ServerWorld p_175579_1_, BlockPos p_175579_2_, PlayerEntity p_175579_3_)
- Overrides:
isUnderSpawnProtection
in classMinecraftServer
-
repliesToStatus
public boolean repliesToStatus()
- Overrides:
repliesToStatus
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_143006_1_)
- Overrides:
setPlayerIdleTimeout
in classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()
- Specified by:
shouldRconBroadcast
in classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()
- Specified by:
shouldInformAdmins
in interfaceICommandSource
-
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize()
- Overrides:
getAbsoluteMaxWorldSize
in classMinecraftServer
-
getCompressionThreshold
public int getCompressionThreshold()
- Overrides:
getCompressionThreshold
in classMinecraftServer
-
convertOldUsers
protected boolean convertOldUsers()
-
waitForRetry
private void waitForRetry()
-
getMaxTickLength
public long getMaxTickLength()
-
getPluginNames
public java.lang.String getPluginNames()
- Specified by:
getPluginNames
in interfaceIServer
-
runCommand
public java.lang.String runCommand(java.lang.String p_71252_1_)
- Specified by:
runCommand
in interfaceIServer
-
storeUsingWhiteList
public void storeUsingWhiteList(boolean p_213223_1_)
-
stopServer
public void stopServer()
- Overrides:
stopServer
in classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_213199_1_)
- Specified by:
isSingleplayerOwner
in classMinecraftServer
-
sendMessage
public void sendMessage(ITextComponent message, java.util.UUID p_145747_2_)
- Specified by:
sendMessage
in interfaceICommandSource
- Overrides:
sendMessage
in classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_230512_1_)
- Overrides:
getScaledTrackingDistance
in classMinecraftServer
-
getLevelIdName
public java.lang.String getLevelIdName()
- Specified by:
getLevelIdName
in interfaceIServer
-
forceSynchronousWrites
public boolean forceSynchronousWrites()
- Overrides:
forceSynchronousWrites
in classMinecraftServer
-
createTextFilterForPlayer
@Nullable public IChatFilter createTextFilterForPlayer(ServerPlayerEntity p_244435_1_)
- Overrides:
createTextFilterForPlayer
in classMinecraftServer
-
-