Class ServerLifecycleHooks

java.lang.Object
net.neoforged.neoforge.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

      @Nullable private static volatile @Nullable CountDownLatch exitLatch
    • currentServer

      @Nullable private static @Nullable MinecraftServer currentServer
  • Constructor Details

    • ServerLifecycleHooks

      public ServerLifecycleHooks()
  • Method Details

    • getServerConfigPath

      private static Path getServerConfigPath(MinecraftServer server)
    • handleServerAboutToStart

      public static void handleServerAboutToStart(MinecraftServer server)
    • handleServerStarting

      public static void 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

      @Nullable public static @Nullable MinecraftServer getCurrentServer()
    • handleExit

      public static void handleExit(int retVal)
    • runModifiers

      private static void runModifiers(MinecraftServer server)