Class LateRegistrationCatcher
java.lang.Object
cloud.commandframework.fabric.internal.LateRegistrationCatcher
- All Implemented Interfaces:
net.fabricmc.api.ModInitializer
public final class LateRegistrationCatcher
extends Object
implements net.fabricmc.api.ModInitializer
Capture server starting events to provide more useful error
checking on late command registration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Get whether at least one server in the current environment has already begun starting.void
-
Constructor Details
-
LateRegistrationCatcher
public LateRegistrationCatcher()
-
-
Method Details
-
onInitialize
public void onInitialize()- Specified by:
onInitialize
in interfacenet.fabricmc.api.ModInitializer
-
hasServerAlreadyStarted
public static boolean hasServerAlreadyStarted()Get whether at least one server in the current environment has already begun starting.This indicates that pre-initialization tasks must have completed.
- Returns:
- whether a server has already started.
-