Class ServerLifecycleHooks

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

@Internal 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
    • allowLogins

      private static final AtomicBoolean allowLogins
    • exitLatch

      private static volatile CountDownLatch exitLatch
    • currentServer

      private static MinecraftServer currentServer
  • 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)
    • expectServerStopped

      public static void expectServerStopped()
    • handleServerStopped

      public static void handleServerStopped(MinecraftServer server)
    • getCurrentServer

      public static MinecraftServer getCurrentServer()
    • buildPackFinder

      @Internal 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> packAcceptor)
    • runModifiers

      private static void runModifiers(MinecraftServer server)
    • handleServerStarted

      public static void handleServerStarted(MinecraftServer server)
    • handleServerStopping

      public static void handleServerStopping(MinecraftServer server)
    • handleServerLogin

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

      private static boolean rejectConnection(Connection connection, ConnectionType type, String message)