Class OraxenHook
- All Implemented Interfaces:
org.bukkit.event.Listener
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
FieldsModifier and TypeFieldDescriptionstatic booleanIndicates whether Oraxen items have been loaded and are ready for use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.plugin.java.JavaPluginGets 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 booleanisHooked()Checks if Oraxen is currently hooked.voidonItemsLoaded(io.th0rgal.oraxen.api.events.OraxenItemsLoadedEvent event) Event handler for Oraxen items loaded event.
-
Field Details
-
ready
public static boolean readyIndicates whether Oraxen items have been loaded and are ready for use.This flag is set to
truewhen theOraxenItemsLoadedEventis 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
readyflag 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
readyflag 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:
trueif Oraxen is installed and active,falseotherwise
-
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
nullif 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
-