cpw.mods.fml.server

## Class FMLServerHandler

- java.lang.Object
- - cpw.mods.fml.server.FMLServerHandler

- All Implemented Interfaces:
    IFMLSidedHandler

      public class FMLServerHandler
      extends java.lang.Object
      implements IFMLSidedHandler

  Handles primary communication from hooked code into the system The FML entry point is `beginServerLoading(MinecraftServer)` called from `DedicatedServer` Obfuscated code should focus on this class and other members of the "server" (or "client") code The actual mod loading is handled at arms length by `Loader` It is expected that a similar class will exist for each target environment: Bukkit and Client side. It should not be directly modified.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addModAsResource(ModContainer container)`
    `void` | `beginServerLoading(MinecraftServer minecraftServer)` Called to start the whole game off from `MinecraftServer.startServer()`
    `void` | `finishServerLoading()` Called a bit later on during server initialization to finish loading mods
    `void` | `fireNetRegistrationEvent(EventBus bus, NetworkManager manager, java.util.Set<java.lang.String> channelSet, java.lang.String channel, Side side)`
    `java.util.List<java.lang.String>` | `getAdditionalBrandingInformation()`
    `INetHandler` | `getClientPlayHandler()`
    `NetworkManager` | `getClientToServerNetworkManager()`
    `java.lang.String` | `getCurrentLanguage()`
    `java.io.File` | `getSavesDirectory()`
    `MinecraftServer` | `getServer()` Get the server instance
    `Side` | `getSide()`
    `void` | `haltGame(java.lang.String message, java.lang.Throwable exception)`
    `static FMLServerHandler` | `instance()`
    `void` | `queryUser(StartupQuery query)`
    `void` | `serverStopped()`
    `boolean` | `shouldAllowPlayerLogins()`
    `boolean` | `shouldServerShouldBeKilledQuietly()`
    `void` | `showGuiScreen(java.lang.Object clientGuiElement)`
    `void` | `waitForPlayClient()`

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

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

- - ### Method Detail

    - #### beginServerLoading

          public void beginServerLoading(MinecraftServer minecraftServer)

      Called to start the whole game off from `MinecraftServer.startServer()`
      Specified by:
        `beginServerLoading` in interface `IFMLSidedHandler`
      Parameters:
        `minecraftServer` -

    - #### finishServerLoading

          public void finishServerLoading()

      Called a bit later on during server initialization to finish loading mods
      Specified by:
        `finishServerLoading` in interface `IFMLSidedHandler`

    - #### haltGame

          public void haltGame(java.lang.String message,
                      java.lang.Throwable exception)

      Specified by:
        `haltGame` in interface `IFMLSidedHandler`

    - #### getSavesDirectory

          public java.io.File getSavesDirectory()

      Specified by:
        `getSavesDirectory` in interface `IFMLSidedHandler`

    - #### getServer

          public MinecraftServer getServer()

      Get the server instance
      Specified by:
        `getServer` in interface `IFMLSidedHandler`

    - #### instance

          public static FMLServerHandler instance()

      Returns:
        the instance

    - #### getAdditionalBrandingInformation

          public java.util.List<java.lang.String> getAdditionalBrandingInformation()

      Specified by:
        `getAdditionalBrandingInformation` in interface `IFMLSidedHandler`

    - #### getSide

          public Side getSide()

      Specified by:
        `getSide` in interface `IFMLSidedHandler`

    - #### showGuiScreen

          public void showGuiScreen(java.lang.Object clientGuiElement)

      Specified by:
        `showGuiScreen` in interface `IFMLSidedHandler`

    - #### queryUser

          public void queryUser(StartupQuery query)
                         throws java.lang.InterruptedException

      Specified by:
        `queryUser` in interface `IFMLSidedHandler`
      Throws:
        `java.lang.InterruptedException`

    - #### shouldServerShouldBeKilledQuietly

          public boolean shouldServerShouldBeKilledQuietly()

      Specified by:
        `shouldServerShouldBeKilledQuietly` in interface `IFMLSidedHandler`

    - #### addModAsResource

          public void addModAsResource(ModContainer container)

      Specified by:
        `addModAsResource` in interface `IFMLSidedHandler`

    - #### getCurrentLanguage

          public java.lang.String getCurrentLanguage()

      Specified by:
        `getCurrentLanguage` in interface `IFMLSidedHandler`

    - #### serverStopped

          public void serverStopped()

      Specified by:
        `serverStopped` in interface `IFMLSidedHandler`

    - #### getClientToServerNetworkManager

          public NetworkManager getClientToServerNetworkManager()

      Specified by:
        `getClientToServerNetworkManager` in interface `IFMLSidedHandler`

    - #### getClientPlayHandler

          public INetHandler getClientPlayHandler()

      Specified by:
        `getClientPlayHandler` in interface `IFMLSidedHandler`

    - #### waitForPlayClient

          public void waitForPlayClient()

      Specified by:
        `waitForPlayClient` in interface `IFMLSidedHandler`

    - #### fireNetRegistrationEvent

          public void fireNetRegistrationEvent(EventBus bus,
                                      NetworkManager manager,
                                      java.util.Set<java.lang.String> channelSet,
                                      java.lang.String channel,
                                      Side side)

      Specified by:
        `fireNetRegistrationEvent` in interface `IFMLSidedHandler`

    - #### shouldAllowPlayerLogins

          public boolean shouldAllowPlayerLogins()

      Specified by:
        `shouldAllowPlayerLogins` in interface `IFMLSidedHandler`