Class TimelessLib

java.lang.Object
dev.bouncingelf10.timelesslib.TimelessLib
All Implemented Interfaces:
net.fabricmc.api.ModInitializer

public class TimelessLib extends Object implements net.fabricmc.api.ModInitializer
  • Field Details

  • Constructor Details

    • TimelessLib

      public TimelessLib()
  • Method Details

    • onInitialize

      public void onInitialize()
      Specified by:
      onInitialize in interface net.fabricmc.api.ModInitializer
    • isServerInitialized

      public static boolean isServerInitialized()
      Checks if the server is initialized.
    • getServer

      public static net.minecraft.server.MinecraftServer getServer() throws IllegalStateException
      Gets the server instance. Will throw an exception if the server is not initialized.
      Returns:
      Server instance
      Throws:
      IllegalStateException
    • scheduler

      public static ServerScheduler scheduler() throws IllegalStateException
      Gets the server task scheduler - for one-off delays, repeating tasks, and step sequences. Will throw an exception if the server is not initialized.
      Returns:
      Server scheduler
      Throws:
      IllegalStateException
    • countdowns

      public static ServerCountdownManager countdowns() throws IllegalStateException
      Gets the server countdown manager. Will throw an exception if the server is not initialized.
      Returns:
      Server countdown manager
      Throws:
      IllegalStateException
    • cooldowns

      public static ServerCooldownManager cooldowns() throws IllegalStateException
      Gets the server cooldown manager. Will throw an exception if the server is not initialized.
      Returns:
      Server cooldown manager
      Throws:
      IllegalStateException
    • animations

      public static AnimationManager animations() throws IllegalStateException
      Gets the server animation manager. Will throw an exception if the server is not initialized.
      Returns:
      Server animation manager
      Throws:
      IllegalStateException