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, worldGenerationProgressListenerFactory
DUMMY
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, 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
private 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 MinecraftServer
IOException
public String createResourcePackHash()
public void setDefaultGameMode(GameMode gameMode)
setDefaultGameMode
in class MinecraftServer
public ServerPropertiesHandler getProperties()
getProperties
in interface DedicatedServer
public boolean shouldGenerateStructures()
shouldGenerateStructures
in class MinecraftServer
public GameMode getDefaultGameMode()
getDefaultGameMode
in class MinecraftServer
public Difficulty getDefaultDifficulty()
getDefaultDifficulty
in class MinecraftServer
public boolean isHardcore()
isHardcore
in class MinecraftServer
public CrashReport populateCrashReport(CrashReport crashReport)
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 boolean isMonsterSpawningEnabled()
isMonsterSpawningEnabled
in class MinecraftServer
public void addSnooperInfo(Snooper snooper)
addSnooperInfo
in interface SnooperListener
addSnooperInfo
in class MinecraftServer
public void enqueueCommand(String string, ServerCommandSource serverCommandSource)
public void executeQueuedCommands()
public boolean isDedicated()
isDedicated
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
public boolean areCommandBlocksEnabled()
areCommandBlocksEnabled
in class MinecraftServer
public int getSpawnProtectionRadius()
getSpawnProtectionRadius
in class MinecraftServer
public boolean isSpawnProtected(World world, BlockPos pos, PlayerEntity player)
isSpawnProtected
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 string)
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 String getLevelName()
getLevelName
in interface DedicatedServer
public boolean syncChunkWrites()
syncChunkWrites
in class MinecraftServer