Package net.neoforged.neoforge.server
Class ServerLifecycleHooks
java.lang.Object
net.neoforged.neoforge.server.ServerLifecycleHooks
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static @Nullable net.minecraft.server.MinecraftServer
private static @Nullable CountDownLatch
private static final org.apache.logging.log4j.Logger
private static final net.minecraft.world.level.storage.LevelResource
private static final org.apache.logging.log4j.Marker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> void
ensureProperSync
(boolean modified, net.minecraft.core.Holder.Reference<T> holder, net.minecraft.core.Registry<T> registry) static void
static @Nullable net.minecraft.server.MinecraftServer
private static Path
getServerConfigPath
(net.minecraft.server.MinecraftServer server) static void
handleExit
(int retVal) static void
handleServerAboutToStart
(net.minecraft.server.MinecraftServer server) static void
handleServerStarted
(net.minecraft.server.MinecraftServer server) static void
handleServerStarting
(net.minecraft.server.MinecraftServer server) static void
handleServerStopped
(net.minecraft.server.MinecraftServer server) static void
handleServerStopping
(net.minecraft.server.MinecraftServer server) private static void
runModifiers
(net.minecraft.server.MinecraftServer server)
-
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 net.minecraft.world.level.storage.LevelResource SERVERCONFIG -
exitLatch
-
currentServer
@Nullable private static @Nullable net.minecraft.server.MinecraftServer currentServer
-
-
Constructor Details
-
ServerLifecycleHooks
public ServerLifecycleHooks()
-
-
Method Details
-
getServerConfigPath
-
handleServerAboutToStart
public static void handleServerAboutToStart(net.minecraft.server.MinecraftServer server) -
handleServerStarting
public static void handleServerStarting(net.minecraft.server.MinecraftServer server) -
handleServerStarted
public static void handleServerStarted(net.minecraft.server.MinecraftServer server) -
handleServerStopping
public static void handleServerStopping(net.minecraft.server.MinecraftServer server) -
expectServerStopped
public static void expectServerStopped() -
handleServerStopped
public static void handleServerStopped(net.minecraft.server.MinecraftServer server) -
getCurrentServer
@Nullable public static @Nullable net.minecraft.server.MinecraftServer getCurrentServer() -
handleExit
public static void handleExit(int retVal) -
ensureProperSync
private static <T> void ensureProperSync(boolean modified, net.minecraft.core.Holder.Reference<T> holder, net.minecraft.core.Registry<T> registry) -
runModifiers
private static void runModifiers(net.minecraft.server.MinecraftServer server)
-