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, worldServerForDimension
public 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 MinecraftServer
public void loadAllWorlds(java.lang.String saveName, java.lang.String worldNameIn, long seed, WorldType type, java.lang.String generatorOptions)
loadAllWorlds
in class MinecraftServer
public boolean init() throws java.io.IOException
init
in class MinecraftServer
java.io.IOException
public void tick()
tick
in class MinecraftServer
public boolean canStructuresSpawn()
canStructuresSpawn
in class MinecraftServer
public GameType getGameType()
getGameType
in class MinecraftServer
public EnumDifficulty getDifficulty()
getDifficulty
in class MinecraftServer
public boolean isHardcore()
isHardcore
in class MinecraftServer
public boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps
in class MinecraftServer
public boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps
in class MinecraftServer
public void saveAllWorlds(boolean isSilent)
saveAllWorlds
in class MinecraftServer
public java.io.File getDataDirectory()
getDataDirectory
in class MinecraftServer
public boolean isDedicatedServer()
isDedicatedServer
in class MinecraftServer
public boolean shouldUseNativeTransport()
shouldUseNativeTransport
in class MinecraftServer
public void finalTick(CrashReport report)
finalTick
in class MinecraftServer
public CrashReport addServerInfoToCrashReport(CrashReport report)
addServerInfoToCrashReport
in class MinecraftServer
public void setDifficultyForAllWorlds(EnumDifficulty difficulty)
setDifficultyForAllWorlds
in class MinecraftServer
public void addServerStatsToSnooper(Snooper playerSnooper)
addServerStatsToSnooper
in interface ISnooperInfo
addServerStatsToSnooper
in class MinecraftServer
public boolean isSnooperEnabled()
isSnooperEnabled
in interface ISnooperInfo
isSnooperEnabled
in class MinecraftServer
public java.lang.String shareToLAN(GameType type, boolean allowCheats)
shareToLAN
in class MinecraftServer
public void stopServer()
stopServer
in class MinecraftServer
public void initiateShutdown()
initiateShutdown
in class MinecraftServer
public boolean getPublic()
public void setGameType(GameType gameMode)
setGameType
in class MinecraftServer
public boolean isCommandBlockEnabled()
isCommandBlockEnabled
in class MinecraftServer
public int getOpPermissionLevel()
getOpPermissionLevel
in class MinecraftServer
public void reloadLootTables()