Class OraxenHook

java.lang.Object
valorless.havenbags.hooks.OraxenHook
All Implemented Interfaces:
org.bukkit.event.Listener

public class OraxenHook extends Object implements org.bukkit.event.Listener
Integration hook for the Nexo plugin.

Oraxen is a custom items and blocks plugin that allows server owners to create unique items with custom textures, properties, and behaviors. This hook enables Ravencrest to integrate with Oraxen's custom items and access its recipe system.

The hook is active only when Oraxen is installed and enabled on the server. Additionally, this hook implements Listener to track when Oraxen items are fully loaded and ready for use.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static boolean
    Indicates whether Oraxen items have been loaded and are ready for use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Attempts to hook into Nexo.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.plugin.java.JavaPlugin
    Gets the Oraxen plugin instance.
    static List<org.bukkit.configuration.ConfigurationSection>
    getRecipes(valorless.valorlessutils.config.Config config)
    Retrieves all recipe configuration sections from a Oraxen config file.
    static boolean
    Checks if Oraxen is currently hooked.
    void
    onItemsLoaded(io.th0rgal.oraxen.api.events.OraxenItemsLoadedEvent event)
    Event handler for Oraxen items loaded event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ready

      public static boolean ready
      Indicates whether Oraxen items have been loaded and are ready for use.

      This flag is set to true when the OraxenItemsLoadedEvent is fired, signaling that all Oraxen custom items are available.

  • Constructor Details

    • OraxenHook

      public OraxenHook()
      Attempts to hook into Nexo.

      Checks if Nexo is installed and logs the integration status. The hook is active only when the plugin is detected.

      Note: Even after hooking, items may not be immediately available. Check the ready flag to ensure items are loaded.

  • Method Details

    • onItemsLoaded

      public void onItemsLoaded(io.th0rgal.oraxen.api.events.OraxenItemsLoadedEvent event)
      Event handler for Oraxen items loaded event.

      This method is called when Oraxen finishes loading all custom items. It sets the ready flag to indicate that Oraxen is fully initialized.

      Parameters:
      event - the OraxenItemsLoadedEvent triggered when items are loaded
    • isHooked

      public static boolean isHooked()
      Checks if Oraxen is currently hooked.

      This method verifies whether Oraxen is present and available for integration.

      Returns:
      true if Oraxen is installed and active, false otherwise
    • getPlugin

      public static org.bukkit.plugin.java.JavaPlugin getPlugin()
      Gets the Oraxen plugin instance.

      This instance can be used to access Oraxen functionality directly.

      Returns:
      the Oraxen plugin instance as a JavaPlugin, or null if not hooked
    • getRecipes

      public static List<org.bukkit.configuration.ConfigurationSection> getRecipes(valorless.valorlessutils.config.Config config)
      Retrieves all recipe configuration sections from a Oraxen config file.

      This method extracts all top-level configuration sections from the provided config, which typically represent individual recipes in Oraxen's format.

      Parameters:
      config - the configuration file to extract recipes from
      Returns:
      a list of ConfigurationSection objects representing individual recipes