Class ServerLifecycleHooks

java.lang.Object
net.minecraftforge.server.ServerLifecycleHooks

public class ServerLifecycleHooks extends Object
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • SERVERHOOKS

      private static final org.apache.logging.log4j.Marker SERVERHOOKS
    • SERVERCONFIG

      private static final LevelResource SERVERCONFIG
    • exitLatch

      private static volatile CountDownLatch exitLatch
    • currentServer

      private static MinecraftServer currentServer
    • allowLogins

      private static AtomicBoolean allowLogins
  • Constructor Details

    • ServerLifecycleHooks

      public ServerLifecycleHooks()
  • Method Details

    • getServerConfigPath

      private static Path getServerConfigPath(MinecraftServer server)
    • handleServerAboutToStart

      public static boolean handleServerAboutToStart(MinecraftServer server)
    • handleServerStarting

      public static boolean handleServerStarting(MinecraftServer server)
    • handleServerStarted

      public static void handleServerStarted(MinecraftServer server)
    • handleServerStopping

      public static void handleServerStopping(MinecraftServer server)
    • expectServerStopped

      public static void expectServerStopped()
    • handleServerStopped

      public static void handleServerStopped(MinecraftServer server)
    • getCurrentServer

      public static MinecraftServer getCurrentServer()
    • handleServerLogin

      public static boolean handleServerLogin(ClientIntentionPacket packet, Connection manager)
    • rejectConnection

      private static void rejectConnection(Connection manager, ConnectionType type, String message)
    • handleExit

      public static void handleExit(int retVal)
    • buildPackFinder

      public static RepositorySource buildPackFinder(Map<net.minecraftforge.forgespi.locating.IModFile,? extends PathPackResources> modResourcePacks)
    • serverPackFinder

      private static void serverPackFinder(Map<net.minecraftforge.forgespi.locating.IModFile,? extends PathPackResources> modResourcePacks, Consumer<Pack> consumer, Pack.PackConstructor factory)
    • runModifiers

      private static void runModifiers(MinecraftServer server)