Package net.minecraftforge.fml.server
Class ServerLifecycleHooks
- java.lang.Object
-
- net.minecraftforge.fml.server.ServerLifecycleHooks
-
public class ServerLifecycleHooks extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.atomic.AtomicBoolean
allowLogins
private static MinecraftServer
currentServer
private static java.util.concurrent.CountDownLatch
exitLatch
private static org.apache.logging.log4j.Logger
LOGGER
private static FolderName
SERVERCONFIG
private static org.apache.logging.log4j.Marker
SERVERHOOKS
-
Constructor Summary
Constructors Constructor Description ServerLifecycleHooks()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ResourcePackLoader.IPackInfoFinder
buildPackFinder(java.util.Map<ModFile,? extends ModFileResourcePack> modResourcePacks, java.util.function.BiConsumer<? super ModFileResourcePack,ResourcePackInfo> packSetter)
Deprecated.static void
expectServerStopped()
static MinecraftServer
getCurrentServer()
private static java.nio.file.Path
getServerConfigPath(MinecraftServer server)
static void
handleExit(int retVal)
static boolean
handleServerAboutToStart(MinecraftServer server)
static boolean
handleServerLogin(CHandshakePacket packet, NetworkManager manager)
static void
handleServerStarted(MinecraftServer server)
static boolean
handleServerStarting(MinecraftServer server)
static void
handleServerStopped(MinecraftServer server)
static void
handleServerStopping(MinecraftServer server)
private static void
rejectConnection(NetworkManager manager, ConnectionType type, java.lang.String message)
private static void
serverPackFinder(java.util.Map<ModFile,? extends ModFileResourcePack> modResourcePacks, java.util.function.BiConsumer<? super ModFileResourcePack,ResourcePackInfo> packSetter, java.util.function.Consumer<ResourcePackInfo> consumer, ResourcePackInfo.IFactory factory)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
SERVERHOOKS
private static final org.apache.logging.log4j.Marker SERVERHOOKS
-
SERVERCONFIG
private static final FolderName SERVERCONFIG
-
exitLatch
private static volatile java.util.concurrent.CountDownLatch exitLatch
-
currentServer
private static MinecraftServer currentServer
-
allowLogins
private static java.util.concurrent.atomic.AtomicBoolean allowLogins
-
-
Method Detail
-
getServerConfigPath
private static java.nio.file.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(CHandshakePacket packet, NetworkManager manager)
-
rejectConnection
private static void rejectConnection(NetworkManager manager, ConnectionType type, java.lang.String message)
-
handleExit
public static void handleExit(int retVal)
-
buildPackFinder
@Deprecated public static ResourcePackLoader.IPackInfoFinder buildPackFinder(java.util.Map<ModFile,? extends ModFileResourcePack> modResourcePacks, java.util.function.BiConsumer<? super ModFileResourcePack,ResourcePackInfo> packSetter)
Deprecated.
-
serverPackFinder
private static void serverPackFinder(java.util.Map<ModFile,? extends ModFileResourcePack> modResourcePacks, java.util.function.BiConsumer<? super ModFileResourcePack,ResourcePackInfo> packSetter, java.util.function.Consumer<ResourcePackInfo> consumer, ResourcePackInfo.IFactory factory)
-
-