Package net.minecraft.src
Class DedicatedServer
java.lang.Object
net.minecraft.server.MinecraftServer
net.minecraft.src.DedicatedServer
- All Implemented Interfaces:
Runnable,ICommandSender,IPlayerUsage,IServer
-
Field Summary
Fields inherited from class net.minecraft.server.MinecraftServer
commandManager, currentTask, debugBuffer, debugUpdateTimeServer, difficultyLevel, percentDone, receivedPacketCountArray, receivedPacketSizeArray, sentPacketCountArray, sentPacketSizeArray, serverProxy, theProfiler, tickTimeArray, timeOfLastDimensionTick, worldServers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPendingCommand(String par1Str, ICommandSender par2ICommandSender) addServerInfoToCrashReport(CrashReport par1CrashReport) Adds the server info, including from theWorldServer, to the crash report.voidaddServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper) booleanbooleanvoidvoidprotected voidfinalTick(CrashReport par1CrashReport) Called on exit from the main run() loop.intvoidfunc_143006_e(int par1) booleanbooleangetBooleanProperty(String par1Str, boolean par2) Gets a boolean property.intDefaults to "1" (Easy) for the dedicated server, defaults to "2" (Normal) on the client.booleanintgetIntProperty(String par1Str, int par2) Gets an integer property.Returns the filename where server properties are storedintReturn the spawn protection area's size.getStringProperty(String par1Str, String par2Str) Gets a string property.booleanisBlockProtected(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) Returns true if a player does not have permission to edit the block at the given coordinates.booleanReturn whether command blocks are enabled.booleanbooleanDefaults to false.booleanReturns whether snooping is enabled or not.voidSaves all of the server properties to the properties file.voidsetProperty(String par1Str, Object par2Obj) Saves an Object with the given property name.shareToLAN(EnumGameType par1EnumGameType, boolean par2) On dedicated does nothing.protected booleanInitialises the server and starts it.protected voidDirectly calls System.exit(0), instantly killing the program.voidMethods inherited from class net.minecraft.server.MinecraftServer
addServerTypeToSnooper, canCommandSenderUseCommand, canCreateBonusChest, clearCurrentTask, convertMapIfNeeded, deleteWorldAndStopServer, enableProfiling, executeCommand, func_143007_ar, func_82010_a, getActiveAnvilConverter, getAllUsernames, getBuildLimit, getCanSpawnAnimals, getCanSpawnNPCs, getCommandManager, getCommandSenderName, getCurrentPlayerCount, getCurrentTimeMillis, getDataDirectory, getEntityWorld, getFile, getFolderName, getForceGamemode, getHostname, getIsServer, getKeyPair, getMaxPlayers, getMinecraftVersion, getMotd, getMOTD, getPlayerCoordinates, getPlayerUsageSnooper, getPlugins, getPort, getPossibleCompletions, getServer, getServerConfigurationManager, getServerHostname, getServerModName, getServerOwner, getServerPort, getServerProxy, getTexturePack, getTickCounter, getUserMessage, getWorldName, initialWorldChunkLoad, initiateShutdown, isDebuggingEnabled, isDemo, isFlightAllowed, isPVPEnabled, isServerInOnlineMode, isServerRunning, isServerStopped, isSinglePlayer, loadAllWorlds, logDebug, logInfo, logSevere, logWarning, main, outputPercentRemaining, run, saveAllWorlds, sendChatToPlayer, sendTimerSpeedImmediately, serverIsInRunLoop, setAllowFlight, setAllowPvp, setBuildLimit, setCanSpawnAnimals, setCanSpawnNPCs, setConfigurationManager, setDemo, setDifficulty, setDifficultyForAllWorlds, setDifficultyFromName, setFolderName, setForceGamemode, setGameType, setHostname, setKeyPair, setMOTD, setOnlineMode, setServerOwner, setServerPort, setTexturePack, setUserMessage, setWorldName, startServerThread, stopServer, textureSize, tick, worldServerForDimensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.src.IServer
executeCommand, getAllUsernames, getCurrentPlayerCount, getFolderName, getHostname, getMaxPlayers, getMinecraftVersion, getMotd, getPlugins, getPort, isDebuggingEnabled, logDebug, logInfo, logSevere, logWarning
-
Constructor Details
-
DedicatedServer
-
-
Method Details
-
startServer
Initialises the server and starts it.- Specified by:
startServerin classMinecraftServer- Throws:
IOException
-
canStructuresSpawn
public boolean canStructuresSpawn()- Specified by:
canStructuresSpawnin classMinecraftServer
-
getGameType
- Specified by:
getGameTypein classMinecraftServer
-
getDifficulty
public int getDifficulty()Defaults to "1" (Easy) for the dedicated server, defaults to "2" (Normal) on the client.- Specified by:
getDifficultyin classMinecraftServer
-
isHardcore
public boolean isHardcore()Defaults to false.- Specified by:
isHardcorein classMinecraftServer
-
finalTick
Called on exit from the main run() loop.- Overrides:
finalTickin classMinecraftServer
-
addServerInfoToCrashReport
Adds the server info, including from theWorldServer, to the crash report.- Overrides:
addServerInfoToCrashReportin classMinecraftServer
-
systemExitNow
protected void systemExitNow()Directly calls System.exit(0), instantly killing the program.- Overrides:
systemExitNowin classMinecraftServer
-
updateTimeLightAndEntities
public void updateTimeLightAndEntities()- Overrides:
updateTimeLightAndEntitiesin classMinecraftServer
-
getAllowNether
public boolean getAllowNether()- Overrides:
getAllowNetherin classMinecraftServer
-
allowSpawnMonsters
public boolean allowSpawnMonsters()- Overrides:
allowSpawnMonstersin classMinecraftServer
-
addServerStatsToSnooper
- Specified by:
addServerStatsToSnooperin interfaceIPlayerUsage- Overrides:
addServerStatsToSnooperin classMinecraftServer
-
isSnooperEnabled
public boolean isSnooperEnabled()Returns whether snooping is enabled or not.- Specified by:
isSnooperEnabledin interfaceIPlayerUsage- Overrides:
isSnooperEnabledin classMinecraftServer
-
addPendingCommand
-
executePendingCommands
public void executePendingCommands() -
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServerin classMinecraftServer
-
getDedicatedPlayerList
-
getNetworkThread
- Specified by:
getNetworkThreadin classMinecraftServer
-
getIntProperty
Gets an integer property. If it does not exist, set it to the specified value.- Specified by:
getIntPropertyin interfaceIServer
-
getStringProperty
Gets a string property. If it does not exist, set it to the specified value.- Specified by:
getStringPropertyin interfaceIServer
-
getBooleanProperty
Gets a boolean property. If it does not exist, set it to the specified value. -
setProperty
Saves an Object with the given property name.- Specified by:
setPropertyin interfaceIServer
-
saveProperties
public void saveProperties()Saves all of the server properties to the properties file.- Specified by:
savePropertiesin interfaceIServer
-
getSettingsFilename
Returns the filename where server properties are stored- Specified by:
getSettingsFilenamein interfaceIServer
-
enableGui
public void enableGui() -
getGuiEnabled
public boolean getGuiEnabled()- Overrides:
getGuiEnabledin classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()Return whether command blocks are enabled.- Specified by:
isCommandBlockEnabledin classMinecraftServer
-
getSpawnProtectionSize
public int getSpawnProtectionSize()Return the spawn protection area's size.- Overrides:
getSpawnProtectionSizein classMinecraftServer
-
isBlockProtected
public boolean isBlockProtected(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) Returns true if a player does not have permission to edit the block at the given coordinates.- Overrides:
isBlockProtectedin classMinecraftServer
-
getLogAgent
- Specified by:
getLogAgentin interfaceIPlayerUsage- Specified by:
getLogAgentin classMinecraftServer
-
func_110455_j
public int func_110455_j()- Specified by:
func_110455_jin classMinecraftServer
-
func_143006_e
public void func_143006_e(int par1) - Overrides:
func_143006_ein classMinecraftServer
-
getConfigurationManager
- Overrides:
getConfigurationManagerin classMinecraftServer
-