public class MinecraftDedicatedServer extends MinecraftServer implements DedicatedServer
Modifier and Type | Field and Description |
---|---|
private List<PendingServerCommand> |
commandQueue |
private class_5514 |
field_26898 |
private DedicatedServerGui |
gui |
private static Logger |
LOGGER |
private ServerPropertiesLoader |
propertiesLoader |
private QueryResponseHandler |
queryResponseHandler |
private RconCommandOutput |
rconCommandOutput |
private RconListener |
rconServer |
private static Pattern |
SHA1_PATTERN |
DEMO_LEVEL_INFO, lastTickLengths, proxy, registryManager, saveHandler, saveProperties, session, USER_CACHE_FILE
DUMMY
Constructor and Description |
---|
MinecraftDedicatedServer(Thread thread,
DynamicRegistryManager.Impl impl,
LevelStorage.Session session,
ResourcePackManager resourcePackManager,
ServerResourceManager serverResourceManager,
SaveProperties saveProperties,
ServerPropertiesLoader serverPropertiesLoader,
com.mojang.datafixers.DataFixer dataFixer,
com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService,
com.mojang.authlib.GameProfileRepository gameProfileRepository,
UserCache userCache,
WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) |
addServerGuiTickable, canExecute, close, convertLevel, createTask, createWorlds, dump, enableProfiler, executeTask, forcePlayerSampleUpdate, getAdvancementLoader, getBossBarManager, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataPackManager, getDefaultGameMode, getFile, getGameProfileRepo, getGameRules, getIconFile, getKeyPair, getLootManager, getMaxPlayerCount, getMetricsData, getNetworkIo, getOverworld, getPermissionLevel, getPlayerIdleTimeout, getPlayerNames, getPredicateManager, getProfiler, getRecipeManager, getRegistryManager, getResourcePackHash, getResourcePackUrl, getRunDirectory, getSavePath, getSaveProperties, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServerPort, getServerStartTime, getSessionService, getSnooper, getSpawnRadius, getStructureManager, getTagManager, getThread, getTicks, getTickTime, getUserCache, getUserName, getVersion, getWorld, getWorldHeight, getWorldRegistryKeys, getWorlds, hasIconFile, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isLoading, isOnlineMode, isPvpEnabled, isRunning, isSinglePlayer, isStopped, isStopping, kickNonWhitelistedPlayers, loadDataPacks, loadWorld, loadWorldResourcePack, method_16208, method_31400, reloadResources, runServer, runTask, save, sendSystemMessage, setCrashReport, setDefaultGameMode, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setForceGameMode, setMotd, setOnlineMode, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, setWorldHeight, shouldExecuteAsync, shouldForceGameMode, shouldPreventProxyConnections, shouldReceiveFeedback, shouldTrackOutput, startServer, stop, stopDebug, tick
hasRunningTasks
cancelTasks, execute, getName, getTaskCount, isOnThread, runTasks, runTasks, send, submit, submit, submitAndJoin, waitForTasks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentPlayerCount, getMaxPlayerCount, getPlayerNames, getVersion
ask, create, method_27918
private static final Logger LOGGER
private static final Pattern SHA1_PATTERN
private final List<PendingServerCommand> commandQueue
private QueryResponseHandler queryResponseHandler
private final RconCommandOutput rconCommandOutput
private RconListener rconServer
private final ServerPropertiesLoader propertiesLoader
@Nullable private DedicatedServerGui gui
@Nullable private final class_5514 field_26898
public MinecraftDedicatedServer(Thread thread, DynamicRegistryManager.Impl impl, LevelStorage.Session session, ResourcePackManager resourcePackManager, ServerResourceManager serverResourceManager, SaveProperties saveProperties, ServerPropertiesLoader serverPropertiesLoader, com.mojang.datafixers.DataFixer dataFixer, com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService, com.mojang.authlib.GameProfileRepository gameProfileRepository, UserCache userCache, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory)
public boolean setupServer() throws IOException
setupServer
in class MinecraftServer
IOException
public boolean shouldSpawnAnimals()
shouldSpawnAnimals
in class MinecraftServer
public boolean isMonsterSpawningEnabled()
isMonsterSpawningEnabled
in class MinecraftServer
public boolean shouldSpawnNpcs()
shouldSpawnNpcs
in class MinecraftServer
public String createResourcePackHash()
public ServerPropertiesHandler getProperties()
getProperties
in interface DedicatedServer
public void method_27731()
method_27731
in class MinecraftServer
public boolean isHardcore()
isHardcore
in class MinecraftServer
public CrashReport populateCrashReport(CrashReport report)
populateCrashReport
in class MinecraftServer
public Optional<String> getModdedStatusMessage()
getModdedStatusMessage
in class MinecraftServer
public void exit()
exit
in class MinecraftServer
public void tickWorlds(BooleanSupplier shouldKeepTicking)
tickWorlds
in class MinecraftServer
public boolean isNetherAllowed()
isNetherAllowed
in class MinecraftServer
public void addSnooperInfo(Snooper snooper)
addSnooperInfo
in interface SnooperListener
addSnooperInfo
in class MinecraftServer
public void enqueueCommand(String command, ServerCommandSource commandSource)
public void executeQueuedCommands()
public boolean isDedicated()
isDedicated
in class MinecraftServer
public int getRateLimit()
getRateLimit
in class MinecraftServer
public boolean isUsingNativeTransport()
isUsingNativeTransport
in class MinecraftServer
public DedicatedPlayerManager getPlayerManager()
getPlayerManager
in class MinecraftServer
public boolean isRemote()
isRemote
in class MinecraftServer
public String getHostname()
getHostname
in interface DedicatedServer
public int getPort()
getPort
in interface DedicatedServer
public String getMotd()
getMotd
in interface DedicatedServer
public void createGui()
public boolean hasGui()
hasGui
in class MinecraftServer
public boolean openToLan(GameMode gameMode, boolean cheatsAllowed, int port)
openToLan
in class MinecraftServer
gameMode
- the game mode connecting players will have set by defaultcheatsAllowed
- whether players on the server have operator permissionsport
- the port to open up to LAN connectionspublic boolean areCommandBlocksEnabled()
areCommandBlocksEnabled
in class MinecraftServer
public int getSpawnProtectionRadius()
getSpawnProtectionRadius
in class MinecraftServer
public boolean isSpawnProtected(ServerWorld world, BlockPos pos, PlayerEntity player)
isSpawnProtected
in class MinecraftServer
public boolean acceptsStatusQuery()
acceptsStatusQuery
in class MinecraftServer
public int getOpPermissionLevel()
getOpPermissionLevel
in class MinecraftServer
public int getFunctionPermissionLevel()
getFunctionPermissionLevel
in class MinecraftServer
public void setPlayerIdleTimeout(int playerIdleTimeout)
setPlayerIdleTimeout
in class MinecraftServer
public boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps
in class MinecraftServer
public boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps
in interface CommandOutput
public int getMaxWorldBorderRadius()
getMaxWorldBorderRadius
in class MinecraftServer
public int getNetworkCompressionThreshold()
getNetworkCompressionThreshold
in class MinecraftServer
protected boolean convertData()
private void sleepFiveSeconds()
public long getMaxTickTime()
public String getPlugins()
getPlugins
in interface DedicatedServer
public String executeRconCommand(String command)
executeRconCommand
in interface DedicatedServer
public void setUseWhitelist(boolean bool)
public void shutdown()
shutdown
in class MinecraftServer
public boolean isHost(com.mojang.authlib.GameProfile profile)
isHost
in class MinecraftServer
public int adjustTrackingDistance(int initialDistance)
adjustTrackingDistance
in class MinecraftServer
public String getLevelName()
getLevelName
in interface DedicatedServer
public boolean syncChunkWrites()
syncChunkWrites
in class MinecraftServer
@Nullable public class_5513 method_31371(ServerPlayerEntity serverPlayerEntity)
method_31371
in class MinecraftServer