Package net.neoforged.neoforge.server
Class ServerLifecycleHooks
java.lang.Object
net.neoforged.neoforge.server.ServerLifecycleHooks
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static @Nullable MinecraftServerprivate static @Nullable CountDownLatchprivate static final org.apache.logging.log4j.Loggerprivate static final LevelResourceprivate static final org.apache.logging.log4j.Marker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> voidensureProperSync(boolean modified, Holder.Reference<T> holder, Registry<T> registry) static voidstatic @Nullable MinecraftServerprivate static PathgetServerConfigPath(MinecraftServer server) static voidhandleExit(int retVal) static voidstatic voidhandleServerStarted(MinecraftServer server) static voidhandleServerStarting(MinecraftServer server) static voidhandleServerStopped(MinecraftServer server) static voidhandleServerStopping(MinecraftServer server) private static voidrunModifiers(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
-
exitLatch
-
currentServer
-
-
Constructor Details
-
ServerLifecycleHooks
public ServerLifecycleHooks()
-
-
Method Details
-
getServerConfigPath
-
handleServerAboutToStart
-
handleServerStarting
-
handleServerStarted
-
handleServerStopping
-
expectServerStopped
public static void expectServerStopped() -
handleServerStopped
-
getCurrentServer
-
handleExit
public static void handleExit(int retVal) -
ensureProperSync
private static <T> void ensureProperSync(boolean modified, Holder.Reference<T> holder, Registry<T> registry) -
runModifiers
-