net.minecraft.server.dedicated

## Class DedicatedServer

- java.lang.Object
- - net.minecraft.server.MinecraftServer
  - - net.minecraft.server.dedicated.DedicatedServer

- All Implemented Interfaces:
    Runnable, ICommandSender, IServer, IPlayerUsage

      public class DedicatedServer
      extends MinecraftServer
      implements IServer

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.server.MinecraftServer

      `currentTask, percentDone, receivedPacketCountArray, receivedPacketSizeArray, sentPacketCountArray, sentPacketSizeArray, theProfiler, tickTimeArray, worldServers, worldTickTimes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DedicatedServer(File par1File)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPendingCommand(String par1Str, ICommandSender par2ICommandSender)`
    `CrashReport` | `addServerInfoToCrashReport(CrashReport par1CrashReport)` Adds the server info, including from theWorldServer, to the crash report.
    `void` | `addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)`
    `boolean` | `allowSpawnMonsters()`
    `boolean` | `canStructuresSpawn()`
    `void` | `enableGui()`
    `void` | `executePendingCommands()`
    `boolean` | `func_96290_a(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)`
    `boolean` | `getAllowNether()`
    `boolean` | `getBooleanProperty(String par1Str, boolean par2)` Gets a boolean property.
    `ServerConfigurationManager` | `getConfigurationManager()`
    `DedicatedPlayerList` | `getDedicatedPlayerList()`
    `int` | `getDifficulty()` Defaults to "1" (Easy) for the dedicated server, defaults to "2" (Normal) on the client.
    `EnumGameType` | `getGameType()`
    `boolean` | `getGuiEnabled()`
    `int` | `getIntProperty(String par1Str, int par2)` Gets an integer property.
    `ILogAgent` | `getLogAgent()`
    `NetworkListenThread` | `getNetworkThread()`
    `String` | `getSettingsFilename()` Returns the filename where server properties are stored
    `int` | `getSpawnProtectionSize()` Return the spawn protection area's size.
    `String` | `getStringProperty(String par1Str, String par2Str)` Gets a string property.
    `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` | `setProperty(String par1Str, Object par2Obj)` Saves an Object with the given property name.
    `String` | `shareToLAN(EnumGameType par1EnumGameType, boolean par2)` On dedicated does nothing.
    `void` | `updateTimeLightAndEntities()`

    - ### Methods inherited from class net.minecraft.server.MinecraftServer

      `addServerTypeToSnooper, canCommandSenderUseCommand, canCreateBonusChest, deleteWorldAndStopServer, enableProfiling, executeCommand, fmlReentry, func_104055_i, func_104056_am, func_82010_a, getActiveAnvilConverter, getAllUsernames, getBuildLimit, getCanSpawnAnimals, getCanSpawnNPCs, getCommandManager, getCommandSenderName, getCurrentPlayerCount, getFile, getFolderName, getHostname, getKeyPair, getMaxPlayers, getMinecraftVersion, getMOTD, getPlayerCoordinates, getPlayerUsageSnooper, getPlugins, getPort, getPossibleCompletions, getServer, getServerConfigurationManager, getServerHostname, getServerModName, getServerMOTD, getServerOwner, getServerPort, getTexturePack, getTickCounter, getUserMessage, getWorldName, initiateShutdown, isDebuggingEnabled, isDemo, isFlightAllowed, isPVPEnabled, isServerInOnlineMode, isServerRunning, isServerStopped, isSinglePlayer, logDebug, logInfo, logSevere, logWarning, main, run, sendChatToPlayer, serverIsInRunLoop, setAllowFlight, setAllowPvp, setBuildLimit, setCanSpawnAnimals, setCanSpawnNPCs, setConfigurationManager, setDemo, setDifficultyForAllWorlds, setFolderName, setGameType, setHostname, setKeyPair, setMOTD, setOnlineMode, setServerOwner, setServerPort, setTexturePack, setWorldName, startServerThread, stopServer, textureSize, tick, translateString, worldServerForDimension`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.minecraft.network.rcon.IServer

      `executeCommand, getAllUsernames, getCurrentPlayerCount, getFolderName, getHostname, getMaxPlayers, getMinecraftVersion, getPlugins, getPort, getServerMOTD, isDebuggingEnabled, logDebug, logInfo, logSevere, logWarning`

- - ### Constructor Detail

    - #### DedicatedServer

          public DedicatedServer(File par1File)

  - ### Method Detail

    - #### canStructuresSpawn

          public boolean canStructuresSpawn()

      Specified by:
        `canStructuresSpawn` in class `MinecraftServer`

    - #### getGameType

          public EnumGameType getGameType()

      Specified by:
        `getGameType` in class `MinecraftServer`

    - #### getDifficulty

          public int getDifficulty()

      Defaults to "1" (Easy) for the dedicated server, defaults to "2" (Normal) on the client.
      Specified by:
        `getDifficulty` in class `MinecraftServer`

    - #### isHardcore

          public boolean isHardcore()

      Defaults to false.
      Specified by:
        `isHardcore` in class `MinecraftServer`

    - #### addServerInfoToCrashReport

          public CrashReport addServerInfoToCrashReport(CrashReport par1CrashReport)

      Adds the server info, including from theWorldServer, to the crash report.
      Overrides:
        `addServerInfoToCrashReport` in class `MinecraftServer`

    - #### updateTimeLightAndEntities

          public void updateTimeLightAndEntities()

      Overrides:
        `updateTimeLightAndEntities` in class `MinecraftServer`

    - #### getAllowNether

          public boolean getAllowNether()

      Overrides:
        `getAllowNether` in class `MinecraftServer`

    - #### allowSpawnMonsters

          public boolean allowSpawnMonsters()

    - #### addServerStatsToSnooper

          public void addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)

      Specified by:
        `addServerStatsToSnooper` in interface `IPlayerUsage`
      Overrides:
        `addServerStatsToSnooper` in class `MinecraftServer`

    - #### isSnooperEnabled

          public boolean isSnooperEnabled()

      Returns whether snooping is enabled or not.
      Specified by:
        `isSnooperEnabled` in interface `IPlayerUsage`
      Overrides:
        `isSnooperEnabled` in class `MinecraftServer`

    - #### addPendingCommand

          public void addPendingCommand(String par1Str,
                               ICommandSender par2ICommandSender)

    - #### executePendingCommands

          public void executePendingCommands()

    - #### isDedicatedServer

          public boolean isDedicatedServer()

      Specified by:
        `isDedicatedServer` in class `MinecraftServer`

    - #### getDedicatedPlayerList

          public DedicatedPlayerList getDedicatedPlayerList()

    - #### getNetworkThread

          public NetworkListenThread getNetworkThread()

      Specified by:
        `getNetworkThread` in class `MinecraftServer`

    - #### getIntProperty

          public int getIntProperty(String par1Str,
                           int par2)

      Gets an integer property. If it does not exist, set it to the specified value.
      Specified by:
        `getIntProperty` in interface `IServer`

    - #### getStringProperty

          public String getStringProperty(String par1Str,
                                 String par2Str)

      Gets a string property. If it does not exist, set it to the specified value.
      Specified by:
        `getStringProperty` in interface `IServer`

    - #### getBooleanProperty

          public boolean getBooleanProperty(String par1Str,
                                   boolean par2)

      Gets a boolean property. If it does not exist, set it to the specified value.

    - #### setProperty

          public void setProperty(String par1Str,
                         Object par2Obj)

      Saves an Object with the given property name.
      Specified by:
        `setProperty` in interface `IServer`

    - #### saveProperties

          public void saveProperties()

      Saves all of the server properties to the properties file.
      Specified by:
        `saveProperties` in interface `IServer`

    - #### getSettingsFilename

          public String getSettingsFilename()

      Returns the filename where server properties are stored
      Specified by:
        `getSettingsFilename` in interface `IServer`

    - #### getGuiEnabled

          public boolean getGuiEnabled()

      Overrides:
        `getGuiEnabled` in class `MinecraftServer`

    - #### shareToLAN

          public String shareToLAN(EnumGameType par1EnumGameType,
                          boolean par2)

      On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
      Specified by:
        `shareToLAN` in class `MinecraftServer`

    - #### isCommandBlockEnabled

          public boolean isCommandBlockEnabled()

      Return whether command blocks are enabled.
      Specified by:
        `isCommandBlockEnabled` in class `MinecraftServer`

    - #### getSpawnProtectionSize

          public int getSpawnProtectionSize()

      Return the spawn protection area's size.
      Overrides:
        `getSpawnProtectionSize` in class `MinecraftServer`

    - #### func_96290_a

          public boolean func_96290_a(World par1World,
                             int par2,
                             int par3,
                             int par4,
                             EntityPlayer par5EntityPlayer)

      Overrides:
        `func_96290_a` in class `MinecraftServer`

    - #### getLogAgent

          public ILogAgent getLogAgent()

      Specified by:
        `getLogAgent` in interface `IPlayerUsage`
      Specified by:
        `getLogAgent` in class `MinecraftServer`

    - #### getConfigurationManager

          public ServerConfigurationManager getConfigurationManager()

      Overrides:
        `getConfigurationManager` in class `MinecraftServer`

    - #### enableGui

          public void enableGui()