Class HookConstants

java.lang.Object
com.github.darksoulq.abyssallib.server.util.HookConstants

public class HookConstants extends Object
A utility class for managing and checking the status of external plugin integrations.

This class scans the server's plugin manager to determine which supported plugins are currently enabled, allowing for safe cross-plugin functionality without causing NoClassDefFoundErrors.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    An enumeration of supported external plugins for which the library provides specialized hooks.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks if a specific external plugin hook is currently active.
    static void
    Initializes the hook states by checking the Bukkit PluginManager.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HookConstants

      public HookConstants()
  • Method Details

    • load

      public static void load()
      Initializes the hook states by checking the Bukkit PluginManager.

      This method should be called during the plugin's enable phase. It logs the status of each discovered hook to the server console.

    • isEnabled

      public static boolean isEnabled(HookConstants.Plugin pl)
      Checks if a specific external plugin hook is currently active.
      Parameters:
      pl - The HookConstants.Plugin to check.
      Returns:
      true if the plugin is installed and enabled on the server.