@Environment(value=CLIENT) public class IntegratedServer extends MinecraftServer
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private LanServerPinger |
lanPinger |
private int |
lanPort |
private UUID |
localPlayerUuid |
private static Logger |
LOGGER |
private boolean |
paused |
DEMO_LEVEL_INFO, lastTickLengths, proxy, registryManager, saveHandler, saveProperties, session, USER_CACHE_FILE
DUMMY
Constructor and Description |
---|
IntegratedServer(Thread serverThread,
MinecraftClient client,
DynamicRegistryManager.Impl registryManager,
LevelStorage.Session session,
ResourcePackManager resourcePackManager,
ServerResourceManager serverResourceManager,
SaveProperties saveProperties,
com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService,
com.mojang.authlib.GameProfileRepository gameProfileRepository,
UserCache userCache,
WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addSnooperInfo(Snooper snooper) |
int |
adjustTrackingDistance(int initialDistance) |
boolean |
areCommandBlocksEnabled()
Specifies whether command blocks can execute commands on the server.
|
int |
getFunctionPermissionLevel() |
Optional<String> |
getModdedStatusMessage() |
int |
getOpPermissionLevel() |
int |
getRateLimit() |
File |
getRunDirectory() |
int |
getServerPort() |
boolean |
isDedicated() |
boolean |
isHost(com.mojang.authlib.GameProfile profile) |
boolean |
isRemote() |
boolean |
isUsingNativeTransport() |
boolean |
openToLan(GameMode gameMode,
boolean cheatsAllowed,
int port)
Opens a server for LAN connections.
|
CrashReport |
populateCrashReport(CrashReport report) |
void |
setCrashReport(CrashReport report) |
void |
setDefaultGameMode(GameMode gameMode) |
void |
setLocalPlayerUuid(UUID localPlayerUuid) |
boolean |
setupServer() |
boolean |
shouldBroadcastConsoleToOps() |
boolean |
shouldBroadcastRconToOps() |
void |
shutdown() |
void |
stop(boolean bool) |
boolean |
syncChunkWrites() |
void |
tick(BooleanSupplier shouldKeepTicking) |
acceptsStatusQuery, addServerGuiTickable, canExecute, close, convertLevel, createTask, createWorlds, dump, enableProfiler, executeTask, exit, forcePlayerSampleUpdate, getAdvancementLoader, getBossBarManager, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataPackManager, getDefaultGameMode, getFile, getGameProfileRepo, getGameRules, getIconFile, getKeyPair, getLootManager, getMaxPlayerCount, getMaxWorldBorderRadius, getMetricsData, getNetworkCompressionThreshold, getNetworkIo, getOverworld, getPermissionLevel, getPlayerIdleTimeout, getPlayerManager, getPlayerNames, getPredicateManager, getProfiler, getRecipeManager, getRegistryManager, getResourcePackHash, getResourcePackUrl, getSavePath, getSaveProperties, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServerStartTime, getSessionService, getSnooper, getSpawnProtectionRadius, getSpawnRadius, getStructureManager, getTagManager, getThread, getTicks, getTickTime, getUserCache, getUserName, getVersion, getWorld, getWorldHeight, getWorldRegistryKeys, getWorlds, hasGui, hasIconFile, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isHardcore, isLoading, isMonsterSpawningEnabled, isNetherAllowed, isOnlineMode, isPvpEnabled, isRunning, isSinglePlayer, isSpawnProtected, isStopped, isStopping, kickNonWhitelistedPlayers, loadDataPacks, loadWorld, loadWorldResourcePack, method_16208, method_27731, method_31371, method_31400, reloadResources, runServer, runTask, save, sendSystemMessage, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setForceGameMode, setMotd, setOnlineMode, setPlayerIdleTimeout, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, setWorldHeight, shouldExecuteAsync, shouldForceGameMode, shouldPreventProxyConnections, shouldReceiveFeedback, shouldSpawnAnimals, shouldSpawnNpcs, shouldTrackOutput, startServer, stopDebug, tickWorlds
hasRunningTasks
cancelTasks, execute, getName, getTaskCount, isOnThread, runTasks, runTasks, send, submit, submit, submitAndJoin, waitForTasks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ask, create, method_27918
private static final Logger LOGGER
private final MinecraftClient client
private boolean paused
private int lanPort
private LanServerPinger lanPinger
private UUID localPlayerUuid
public IntegratedServer(Thread serverThread, MinecraftClient client, DynamicRegistryManager.Impl registryManager, LevelStorage.Session session, ResourcePackManager resourcePackManager, ServerResourceManager serverResourceManager, SaveProperties saveProperties, com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService, com.mojang.authlib.GameProfileRepository gameProfileRepository, UserCache userCache, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory)
public boolean setupServer()
setupServer
in class MinecraftServer
public void tick(BooleanSupplier shouldKeepTicking)
tick
in class MinecraftServer
public boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps
in class MinecraftServer
public boolean shouldBroadcastConsoleToOps()
public File getRunDirectory()
getRunDirectory
in class MinecraftServer
public boolean isDedicated()
isDedicated
in class MinecraftServer
public int getRateLimit()
getRateLimit
in class MinecraftServer
public boolean isUsingNativeTransport()
isUsingNativeTransport
in class MinecraftServer
public void setCrashReport(CrashReport report)
setCrashReport
in class MinecraftServer
public CrashReport populateCrashReport(CrashReport report)
populateCrashReport
in class MinecraftServer
public Optional<String> getModdedStatusMessage()
getModdedStatusMessage
in class MinecraftServer
public void addSnooperInfo(Snooper snooper)
addSnooperInfo
in interface SnooperListener
addSnooperInfo
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 void shutdown()
shutdown
in class MinecraftServer
public void stop(boolean bool)
stop
in class MinecraftServer
public boolean isRemote()
isRemote
in class MinecraftServer
public int getServerPort()
getServerPort
in class MinecraftServer
public void setDefaultGameMode(GameMode gameMode)
setDefaultGameMode
in class MinecraftServer
public boolean areCommandBlocksEnabled()
areCommandBlocksEnabled
in class MinecraftServer
public int getOpPermissionLevel()
getOpPermissionLevel
in class MinecraftServer
public int getFunctionPermissionLevel()
getFunctionPermissionLevel
in class MinecraftServer
public void setLocalPlayerUuid(UUID localPlayerUuid)
public boolean isHost(com.mojang.authlib.GameProfile profile)
isHost
in class MinecraftServer
public int adjustTrackingDistance(int initialDistance)
adjustTrackingDistance
in class MinecraftServer
public boolean syncChunkWrites()
syncChunkWrites
in class MinecraftServer