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 Details

    • LateRegistrationCatcher

      public LateRegistrationCatcher()
  • Method Details

    • onInitialize

      public void onInitialize()
      Specified by:
      onInitialize in interface net.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.