public class DedicatedServer extends MinecraftServer implements IServer
Modifier and Type | Field and Description |
---|---|
static boolean |
allowPlayerLogins |
java.util.List<ServerCommand> |
pendingCommandList |
commandManager, currentTask, futureTaskQueue, percentDone, serverProxy, theProfiler, tickTimeArray, USER_CACHE_FILE, worldServers, worldTickTimes
Constructor and Description |
---|
DedicatedServer(java.io.File workDir) |
Modifier and Type | Method and Description |
---|---|
void |
addChatMessage(IChatComponent message)
Send a chat message to the CommandSender
|
void |
addPendingCommand(java.lang.String input,
ICommandSender sender) |
CrashReport |
addServerInfoToCrashReport(CrashReport report)
Adds the server info, including from theWorldServer, to the crash report.
|
void |
addServerStatsToSnooper(PlayerUsageSnooper playerSnooper) |
boolean |
allowSpawnMonsters() |
boolean |
canStructuresSpawn() |
protected boolean |
convertFiles() |
void |
executePendingCommands() |
protected void |
finalTick(CrashReport report)
Called on exit from the main run() loop.
|
boolean |
getAllowNether() |
boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue)
Gets a boolean property.
|
DedicatedPlayerList |
getConfigurationManager() |
EnumDifficulty |
getDifficulty()
Get the server's difficulty
|
WorldSettings.GameType |
getGameType() |
boolean |
getGuiEnabled() |
int |
getIntProperty(java.lang.String key,
int defaultValue)
Gets an integer property.
|
long |
getMaxTickTime() |
int |
getMaxWorldSize() |
int |
getNetworkCompressionTreshold()
The compression treshold.
|
int |
getOpPermissionLevel() |
java.lang.String |
getPlugins()
Used by RCon's Query in the form of "MajorServerMod 1.2.3: MyPlugin 1.3; AnotherPlugin 2.1; AndSoForth 1.0".
|
java.lang.String |
getSettingsFilename()
Returns the filename where server properties are stored
|
int |
getSpawnProtectionSize()
Return the spawn protection area's size.
|
java.lang.String |
getStringProperty(java.lang.String key,
java.lang.String defaultValue)
Gets a string property.
|
java.lang.String |
handleRConCommand(java.lang.String command)
Handle a command received by an RCon instance
|
boolean |
isAnnouncingPlayerAchievements() |
boolean |
isBlockProtected(World worldIn,
BlockPos pos,
EntityPlayer playerIn) |
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 |
saveProperties()
Saves all of the server properties to the properties file.
|
void |
setGameType(WorldSettings.GameType gameMode)
Sets the game type for all worlds.
|
void |
setGuiEnabled() |
void |
setPlayerIdleTimeout(int idleTimeout) |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Saves an Object with the given property name.
|
java.lang.String |
shareToLAN(WorldSettings.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.
|
protected boolean |
startServer()
Initialises the server and starts it.
|
protected void |
systemExitNow()
Directly calls System.exit(0), instantly killing the program.
|
void |
updateTimeLightAndEntities() |
addScheduledTask, addServerTypeToSnooper, callFromMainThread, canCommandSenderUseCommand, canCreateBonusChest, clearCurrentTask, convertMapIfNeeded, createNewCommandManager, deleteWorldAndStopServer, enableProfiling, getActiveAnvilConverter, getAllUsernames, getBuildLimit, getCanSpawnAnimals, getCanSpawnNPCs, getCommandManager, getCommandSenderEntity, getCurrentPlayerCount, getCurrentTime, getCurrentTimeMillis, getDataDirectory, getDisplayName, getEntityFromUuid, getEntityWorld, getFile, getFolderName, getForceGamemode, getGameProfileRepository, getGameProfiles, getHostname, getKeyPair, getMaxPlayerIdleMinutes, getMaxPlayers, getMinecraftSessionService, getMinecraftVersion, getMotd, getMOTD, getName, getNetworkSystem, getPlayerProfileCache, getPlayerUsageSnooper, getPort, getPosition, getPositionVector, getResourcePackHash, getResourcePackUrl, getServer, getServerHostname, getServerModName, getServerOwner, getServerPort, getServerProxy, getServerStatusResponse, getServerThread, getTabCompletions, getTickCounter, getUserMessage, getWorldName, initialWorldChunkLoad, initiateShutdown, isAnvilFileSet, isCallingFromMinecraftThread, isDebuggingEnabled, isDemo, isFlightAllowed, isPVPEnabled, isServerInOnlineMode, isServerRunning, isServerStopped, isSinglePlayer, loadAllWorlds, logDebug, logInfo, logSevere, logWarning, main, outputPercentRemaining, refreshStatusNextTick, registerTickable, run, saveAllWorlds, sendCommandFeedback, serverIsInRunLoop, setAllowFlight, setAllowPvp, setBuildLimit, setCanSpawnAnimals, setCanSpawnNPCs, setCommandStat, setConfigManager, setDemo, setDifficultyForAllWorlds, setFolderName, setForceGamemode, setHostname, setInstance, setKeyPair, setMOTD, setOnlineMode, setResourcePack, setResourcePackFromWorld, setServerOwner, setServerPort, setUserMessage, setWorldName, startServerThread, stopServer, tick, worldServerForDimension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllUsernames, getCurrentPlayerCount, getFolderName, getHostname, getMaxPlayers, getMinecraftVersion, getMotd, getPort, isDebuggingEnabled, logDebug, logInfo, logSevere, logWarning
public final java.util.List<ServerCommand> pendingCommandList
public static boolean allowPlayerLogins
protected boolean startServer() throws java.io.IOException
startServer
in class MinecraftServer
java.io.IOException
public void setGameType(WorldSettings.GameType gameMode)
setGameType
in class MinecraftServer
public boolean canStructuresSpawn()
canStructuresSpawn
in class MinecraftServer
public WorldSettings.GameType getGameType()
getGameType
in class MinecraftServer
public EnumDifficulty getDifficulty()
getDifficulty
in class MinecraftServer
public boolean isHardcore()
isHardcore
in class MinecraftServer
protected void finalTick(CrashReport report)
finalTick
in class MinecraftServer
public CrashReport addServerInfoToCrashReport(CrashReport report)
addServerInfoToCrashReport
in class MinecraftServer
protected void systemExitNow()
systemExitNow
in class MinecraftServer
public void updateTimeLightAndEntities()
updateTimeLightAndEntities
in class MinecraftServer
public boolean getAllowNether()
getAllowNether
in class MinecraftServer
public boolean allowSpawnMonsters()
allowSpawnMonsters
in class MinecraftServer
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
addServerStatsToSnooper
in interface IPlayerUsage
addServerStatsToSnooper
in class MinecraftServer
public boolean isSnooperEnabled()
isSnooperEnabled
in interface IPlayerUsage
isSnooperEnabled
in class MinecraftServer
public void addPendingCommand(java.lang.String input, ICommandSender sender)
public void executePendingCommands()
public boolean isDedicatedServer()
isDedicatedServer
in class MinecraftServer
public boolean shouldUseNativeTransport()
shouldUseNativeTransport
in class MinecraftServer
public DedicatedPlayerList getConfigurationManager()
getConfigurationManager
in class MinecraftServer
public int getIntProperty(java.lang.String key, int defaultValue)
getIntProperty
in interface IServer
public java.lang.String getStringProperty(java.lang.String key, java.lang.String defaultValue)
getStringProperty
in interface IServer
public boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
public void setProperty(java.lang.String key, java.lang.Object value)
setProperty
in interface IServer
public void saveProperties()
saveProperties
in interface IServer
public java.lang.String getSettingsFilename()
getSettingsFilename
in interface IServer
public void setGuiEnabled()
public boolean getGuiEnabled()
getGuiEnabled
in class MinecraftServer
public java.lang.String shareToLAN(WorldSettings.GameType type, boolean allowCheats)
shareToLAN
in class MinecraftServer
public boolean isCommandBlockEnabled()
isCommandBlockEnabled
in class MinecraftServer
public int getSpawnProtectionSize()
getSpawnProtectionSize
in class MinecraftServer
public boolean isBlockProtected(World worldIn, BlockPos pos, EntityPlayer playerIn)
isBlockProtected
in class MinecraftServer
public int getOpPermissionLevel()
getOpPermissionLevel
in class MinecraftServer
public void setPlayerIdleTimeout(int idleTimeout)
setPlayerIdleTimeout
in class MinecraftServer
public boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps
in class MinecraftServer
public boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps
in class MinecraftServer
public boolean isAnnouncingPlayerAchievements()
isAnnouncingPlayerAchievements
in class MinecraftServer
public int getMaxWorldSize()
getMaxWorldSize
in class MinecraftServer
public int getNetworkCompressionTreshold()
getNetworkCompressionTreshold
in class MinecraftServer
protected boolean convertFiles() throws java.io.IOException
java.io.IOException
public long getMaxTickTime()
public java.lang.String getPlugins()
getPlugins
in interface IServer
public java.lang.String handleRConCommand(java.lang.String command)
handleRConCommand
in interface IServer
public void addChatMessage(IChatComponent message)
MinecraftServer
addChatMessage
in interface ICommandSender
addChatMessage
in class MinecraftServer