public class IntegratedServer extends MinecraftServer
commandManager, currentTask, futureTaskQueue, percentDone, serverProxy, theProfiler, tickTimeArray, USER_CACHE_FILE, worlds, worldTickTimes| Constructor and Description |
|---|
IntegratedServer(Minecraft clientIn,
java.lang.String folderNameIn,
java.lang.String worldNameIn,
WorldSettings worldSettingsIn,
YggdrasilAuthenticationService authServiceIn,
MinecraftSessionService sessionServiceIn,
GameProfileRepository profileRepoIn,
PlayerProfileCache profileCacheIn) |
| Modifier and Type | Method and Description |
|---|---|
CrashReport |
addServerInfoToCrashReport(CrashReport report)
Adds the server info, including from theWorldServer, to the crash report.
|
void |
addServerStatsToSnooper(Snooper playerSnooper) |
boolean |
canStructuresSpawn() |
ServerCommandManager |
createCommandManager() |
void |
finalTick(CrashReport report)
Called on exit from the main run() loop.
|
java.io.File |
getDataDirectory() |
EnumDifficulty |
getDifficulty()
Get the server's difficulty
|
GameType |
getGameType() |
int |
getOpPermissionLevel() |
boolean |
getPublic()
Returns true if this integrated server is open to LAN
|
boolean |
init()
Initialises the server and starts it.
|
void |
initiateShutdown()
Sets the serverRunning variable to false, in order to get the server to shut down.
|
boolean |
isCommandBlockEnabled()
Return whether command blocks are enabled.
|
boolean |
isDedicatedServer() |
boolean |
isHardcore()
Defaults to false.
|
boolean |
isSnooperEnabled()
Returns whether snooping is enabled or not.
|
void |
loadAllWorlds(java.lang.String saveName,
java.lang.String worldNameIn,
long seed,
WorldType type,
java.lang.String generatorOptions) |
void |
reloadLootTables() |
void |
saveAllWorlds(boolean isSilent)
par1 indicates if a log message should be output.
|
void |
setDifficultyForAllWorlds(EnumDifficulty difficulty) |
void |
setGameType(GameType gameMode)
Sets the game type for all worlds.
|
java.lang.String |
shareToLAN(GameType type,
boolean allowCheats)
On dedicated does nothing.
|
boolean |
shouldBroadcastConsoleToOps()
Get if console command events should be broadcast to ops
|
boolean |
shouldBroadcastRconToOps()
Get if RCON command events should be broadcast to ops
|
boolean |
shouldUseNativeTransport()
Get if native transport should be used.
|
void |
stopServer()
Saves all necessary data as preparation for stopping the server.
|
void |
tick()
Main function called by run() every loop.
|
addScheduledTask, addServerTypeToSnooper, allowSpawnMonsters, applyServerIconToResponse, callFromMainThread, canCreateBonusChest, canUseCommand, clearCurrentTask, convertMapIfNeeded, enableProfiling, getActiveAnvilConverter, getAllowNether, getBuildLimit, getCanSpawnAnimals, getCanSpawnNPCs, getCommandManager, getCommandSenderEntity, getCurrentPlayerCount, getCurrentTime, getCurrentTimeMillis, getDataFixer, getDisplayName, getEntityFromUuid, getEntityWorld, getFile, getFolderName, getForceGamemode, getGameProfileRepository, getGuiEnabled, getKeyPair, getMaxPlayerIdleMinutes, getMaxPlayers, getMaxWorldSize, getMinecraftSessionService, getMinecraftVersion, getMOTD, getName, getNetworkCompressionThreshold, getNetworkSystem, getOnlinePlayerNames, getOnlinePlayerProfiles, getPlayerList, getPlayerProfileCache, getPlayerUsageSnooper, getPosition, getPositionVector, getPreventProxyConnections, getResourcePackHash, getResourcePackUrl, getServer, getServerHostname, getServerModName, getServerOwner, getServerPort, getServerProxy, getServerStatusResponse, getServerThread, getSpawnProtectionSize, getSpawnRadius, getTabCompletions, getTickCounter, getUserMessage, getWorldIconFile, getWorldName, initialWorldChunkLoad, isAnnouncingPlayerAchievements, isAnvilFileSet, isBlockProtected, isCallingFromMinecraftThread, isDebuggingEnabled, isDemo, isFlightAllowed, isPVPEnabled, isServerInOnlineMode, isServerRunning, isServerStopped, isSinglePlayer, isWorldIconSet, logDebug, logInfo, logSevere, logWarning, main, outputPercentRemaining, refreshStatusNextTick, registerTickable, run, sendCommandFeedback, sendMessage, serverIsInRunLoop, setAllowFlight, setAllowPvp, setBuildLimit, setCanSpawnAnimals, setCanSpawnNPCs, setCommandStat, setDemo, setFolderName, setForceGamemode, setHostname, setKeyPair, setMOTD, setOnlineMode, setPlayerIdleTimeout, setPlayerList, setPreventProxyConnections, setResourcePack, setResourcePackFromWorld, setServerOwner, setServerPort, setUserMessage, setWorldName, startServerThread, systemExitNow, updateTimeLightAndEntities, worldServerForDimensionpublic IntegratedServer(Minecraft clientIn, java.lang.String folderNameIn, java.lang.String worldNameIn, WorldSettings worldSettingsIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
public ServerCommandManager createCommandManager()
createCommandManager in class MinecraftServerpublic void loadAllWorlds(java.lang.String saveName,
java.lang.String worldNameIn,
long seed,
WorldType type,
java.lang.String generatorOptions)
loadAllWorlds in class MinecraftServerpublic boolean init()
throws java.io.IOException
init in class MinecraftServerjava.io.IOExceptionpublic void tick()
tick in class MinecraftServerpublic boolean canStructuresSpawn()
canStructuresSpawn in class MinecraftServerpublic GameType getGameType()
getGameType in class MinecraftServerpublic EnumDifficulty getDifficulty()
getDifficulty in class MinecraftServerpublic boolean isHardcore()
isHardcore in class MinecraftServerpublic boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps in class MinecraftServerpublic boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps in class MinecraftServerpublic void saveAllWorlds(boolean isSilent)
saveAllWorlds in class MinecraftServerpublic java.io.File getDataDirectory()
getDataDirectory in class MinecraftServerpublic boolean isDedicatedServer()
isDedicatedServer in class MinecraftServerpublic boolean shouldUseNativeTransport()
shouldUseNativeTransport in class MinecraftServerpublic void finalTick(CrashReport report)
finalTick in class MinecraftServerpublic CrashReport addServerInfoToCrashReport(CrashReport report)
addServerInfoToCrashReport in class MinecraftServerpublic void setDifficultyForAllWorlds(EnumDifficulty difficulty)
setDifficultyForAllWorlds in class MinecraftServerpublic void addServerStatsToSnooper(Snooper playerSnooper)
addServerStatsToSnooper in interface ISnooperInfoaddServerStatsToSnooper in class MinecraftServerpublic boolean isSnooperEnabled()
isSnooperEnabled in interface ISnooperInfoisSnooperEnabled in class MinecraftServerpublic java.lang.String shareToLAN(GameType type, boolean allowCheats)
shareToLAN in class MinecraftServerpublic void stopServer()
stopServer in class MinecraftServerpublic void initiateShutdown()
initiateShutdown in class MinecraftServerpublic boolean getPublic()
public void setGameType(GameType gameMode)
setGameType in class MinecraftServerpublic boolean isCommandBlockEnabled()
isCommandBlockEnabled in class MinecraftServerpublic int getOpPermissionLevel()
getOpPermissionLevel in class MinecraftServerpublic void reloadLootTables()