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
    • getServerScheduler

      public static Scheduler<net.minecraft.server.MinecraftServer> getServerScheduler() throws IllegalStateException
      Gets the server scheduler. Will throw an exception if the server is not initialized.
      Returns:
      Server scheduler
      Throws:
      IllegalStateException
    • getServerCountdownManager

      public static CountdownManager<net.minecraft.server.MinecraftServer> getServerCountdownManager() throws IllegalStateException
      Gets the server countdown manager. Will throw an exception if the server is not initialized.
      Returns:
      Server countdown manager
      Throws:
      IllegalStateException
    • getServerCooldownManager

      public static ServerCooldownManager<net.minecraft.server.MinecraftServer> getServerCooldownManager() throws IllegalStateException
      Gets the server cooldown manager. Will throw an exception if the server is not initialized.
      Returns:
      Server cooldown manager
      Throws:
      IllegalStateException
    • getServerAnimationManager

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