public class MinecraftDedicatedServer extends MinecraftServer implements DedicatedServer
| Modifier and Type | Field and Description |
|---|---|
private List<PendingServerCommand> |
commandQueue |
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, dimensionTracker, field_24371, lastTickLengths, proxy, saveProperties, session, USER_CACHE_FILEDUMMY| Constructor and Description |
|---|
MinecraftDedicatedServer(Thread thread,
RegistryTracker.Modifiable modifiable,
LevelStorage.Session session,
ResourcePackManager<ResourcePackProfile> 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, 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_29741, reloadResources, runTask, save, sendSystemMessage, setCrashReport, setDefaultGameMode, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setForceGameMode, setKeyPair, setMotd, setOnlineMode, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, setWorldHeight, shouldExecuteAsync, shouldForceGameMode, shouldPreventProxyConnections, shouldReceiveFeedback, shouldTrackOutput, startServer, 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, create, method_27918private 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
public MinecraftDedicatedServer(Thread thread, RegistryTracker.Modifiable modifiable, LevelStorage.Session session, ResourcePackManager<ResourcePackProfile> 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 MinecraftServerIOExceptionpublic boolean shouldSpawnAnimals()
shouldSpawnAnimals in class MinecraftServerpublic boolean isMonsterSpawningEnabled()
isMonsterSpawningEnabled in class MinecraftServerpublic boolean shouldSpawnNpcs()
shouldSpawnNpcs in class MinecraftServerpublic String createResourcePackHash()
public ServerPropertiesHandler getProperties()
getProperties in interface DedicatedServerpublic void method_27731()
method_27731 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 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(ServerWorld serverWorld, BlockPos pos, PlayerEntity player)
isSpawnProtected in class MinecraftServerpublic boolean acceptsStatusQuery()
acceptsStatusQuery 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 command)
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 int adjustTrackingDistance(int initialDistance)
adjustTrackingDistance in class MinecraftServerpublic String getLevelName()
getLevelName in interface DedicatedServerpublic boolean syncChunkWrites()
syncChunkWrites in class MinecraftServer