public class MinecraftDedicatedServer extends MinecraftServer implements DedicatedServer
| Modifier and Type | Field and Description |
|---|---|
private List<PendingServerCommand> |
commandQueue |
private GameMode |
defaultGameMode |
private DedicatedServerGui |
gui |
private static Logger |
LOGGER |
private ServerPropertiesLoader |
propertiesLoader |
private QueryResponseHandler |
queryResponseHandler |
private ServerCommandOutput |
rconCommandOutput |
private RconServer |
rconServer |
private static Pattern |
SHA1_PATTERN |
DEMO_LEVEL_INFO, lastTickLengths, proxy, serverThread, session, USER_CACHE_FILE, worldGenerationProgressListenerFactoryDUMMY| Constructor and Description |
|---|
MinecraftDedicatedServer(LevelStorage.Session session,
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, createTask, createWorlds, dump, enableProfiler, executeTask, forcePlayerSampleUpdate, getAdvancementLoader, getBossBarManager, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataManager, getDataPackManager, getFile, getGameProfileRepo, getGameRules, getIconFile, getKeyPair, getLootManager, getMaxPlayerCount, getMetricsData, getNetworkIo, getPermissionLevel, getPlayerIdleTimeout, getPlayerNames, getPredicateManager, getProfiler, getRecipeManager, getResourcePackHash, getResourcePackUrl, getRunDirectory, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServerName, getServerPort, getServerStartTime, getSessionService, getSnooper, getSpawnRadius, getTagManager, getThread, getTicks, getTickTime, getUserCache, getUserName, getVersion, getWorkerExecutor, getWorld, getWorldHeight, getWorlds, hasIconFile, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isLoading, isOnlineMode, isPvpEnabled, isRunning, isSinglePlayer, isStopped, isStopping, kickNonWhitelistedPlayers, loadWorld, loadWorldDataPacks, loadWorldResourcePack, main, method_16208, method_27050, method_27052, prepareStartRegion, reload, run, runTask, save, sendSystemMessage, setBonusChest, setCrashReport, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setEraseCache, setFavicon, setFlightEnabled, setForceGameMode, setForceWorldUpgrade, setKeyPair, setLoadingStage, setMotd, setOnlineMode, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, setSpawnAnimals, setSpawnNpcs, setUserName, setWorldHeight, shouldExecuteAsync, shouldForceGameMode, shouldPreventProxyConnections, shouldReceiveFeedback, shouldSpawnAnimals, shouldSpawnNpcs, shouldTrackOutput, start, stop, stopDebug, tickhasRunningTaskscancelTasks, execute, getName, getTaskCount, isOnThread, runTasks, runTasks, send, submit, submit, submitAndJoin, waitForTasksclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentPlayerCount, getMaxPlayerCount, getPlayerNames, getVersionask, createprivate static final Logger LOGGER
private static final Pattern SHA1_PATTERN
private final List<PendingServerCommand> commandQueue
private QueryResponseHandler queryResponseHandler
private final ServerCommandOutput rconCommandOutput
private RconServer rconServer
private final ServerPropertiesLoader propertiesLoader
private GameMode defaultGameMode
@Nullable private DedicatedServerGui gui
public MinecraftDedicatedServer(LevelStorage.Session session, 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 MinecraftServerIOExceptionpublic String createResourcePackHash()
public void setDefaultGameMode(GameMode gameMode)
setDefaultGameMode in class MinecraftServerpublic ServerPropertiesHandler getProperties()
getProperties in interface DedicatedServerpublic boolean shouldGenerateStructures()
shouldGenerateStructures in class MinecraftServerpublic GameMode getDefaultGameMode()
getDefaultGameMode in class MinecraftServerpublic Difficulty getDefaultDifficulty()
getDefaultDifficulty in class MinecraftServerpublic boolean isHardcore()
isHardcore in class MinecraftServerpublic CrashReport populateCrashReport(CrashReport crashReport)
populateCrashReport in class MinecraftServerpublic Optional<String> getModdedStatusMessage()
getModdedStatusMessage in class MinecraftServerpublic void exit()
exit in class MinecraftServerpublic void tickWorlds(BooleanSupplier shouldKeepTicking)
tickWorlds in class MinecraftServerpublic boolean isNetherAllowed()
isNetherAllowed in class MinecraftServerpublic boolean isMonsterSpawningEnabled()
isMonsterSpawningEnabled in class MinecraftServerpublic void addSnooperInfo(Snooper snooper)
addSnooperInfo in interface SnooperListeneraddSnooperInfo in class MinecraftServerpublic void enqueueCommand(String string, ServerCommandSource serverCommandSource)
public void executeQueuedCommands()
public boolean isDedicated()
isDedicated in class MinecraftServerpublic boolean isUsingNativeTransport()
isUsingNativeTransport in class MinecraftServerpublic DedicatedPlayerManager getPlayerManager()
getPlayerManager in class MinecraftServerpublic boolean isRemote()
isRemote in class MinecraftServerpublic String getHostname()
getHostname in interface DedicatedServerpublic int getPort()
getPort in interface DedicatedServerpublic String getMotd()
getMotd in interface DedicatedServerpublic void createGui()
public boolean hasGui()
hasGui in class MinecraftServerpublic boolean openToLan(GameMode gameMode, boolean cheatsAllowed, int port)
openToLan in class MinecraftServerpublic boolean areCommandBlocksEnabled()
areCommandBlocksEnabled in class MinecraftServerpublic int getSpawnProtectionRadius()
getSpawnProtectionRadius in class MinecraftServerpublic boolean isSpawnProtected(World world, BlockPos pos, PlayerEntity player)
isSpawnProtected in class MinecraftServerpublic int getOpPermissionLevel()
getOpPermissionLevel in class MinecraftServerpublic int getFunctionPermissionLevel()
getFunctionPermissionLevel in class MinecraftServerpublic void setPlayerIdleTimeout(int playerIdleTimeout)
setPlayerIdleTimeout in class MinecraftServerpublic boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps in class MinecraftServerpublic boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps in interface CommandOutputpublic int getMaxWorldBorderRadius()
getMaxWorldBorderRadius in class MinecraftServerpublic int getNetworkCompressionThreshold()
getNetworkCompressionThreshold in class MinecraftServerprotected boolean convertData()
private void sleepFiveSeconds()
public long getMaxTickTime()
public String getPlugins()
getPlugins in interface DedicatedServerpublic String executeRconCommand(String string)
executeRconCommand in interface DedicatedServerpublic void setUseWhitelist(boolean bool)
public void shutdown()
shutdown in class MinecraftServerpublic boolean isHost(com.mojang.authlib.GameProfile profile)
isHost in class MinecraftServerpublic String getLevelName()
getLevelName in interface DedicatedServerpublic boolean syncChunkWrites()
syncChunkWrites in class MinecraftServer