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