API
How to integrate your plugin with Oraxen
In order to use Oraxen API, you need to add Oraxen to your dependencies.
Below are repository and dependency information.
Replace
VERSION
with the Oraxen version you wish to use.
The latest release can be found here.\<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Because maven decides to be weird, you will need to exclude a lot of imports from Oraxen.
This is not an issue when using Gradle
<dependency>
<groupId>com.github.oraxen</groupId>
<artifactId>oraxen</artifactId>
<version>VERSION</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>gs.mclo</groupId>
<artifactId>mclogs</artifactId>
</exclusion>
<exclusion>
<groupId>com.ticxo.playeranimator</groupId>
<artifactId>PlayerAnimator</artifactId>
</exclusion>
<exclusion>
<groupId>me.gabytm.util</groupId>
<artifactId>actions-spigot</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.jeff_media</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
maven("https://jitpack.io")
compileOnly("com.github.oraxen:oraxen:VERSION")
maven { url 'https://jitpack.io' }
compileOnly 'com.github.oraxen:oraxen:VERSION'
All methods and better explanations of their functionality and parameters can be found in the actual Classes.
Simply open them in your IDE to get a full list of them.
Oraxen is built around an ItemsBuilder class that allows you to create items easily. When the plugin starts it parses the configurations to generate builders for each type of items. Each builder can be used to generate itemstacks.
OraxenItems.getItemById(itemID); // where itemID is a section in items configurations
OraxenItems.isAnItem(itemID);
You can use to check if an ItemStack is an OraxenItem (it will return null if OraxenID doesn't exist)
OraxenItems.getIdByItem(itemstack);
Place an OraxenBlock at a given location
OraxenBlocks.place(itemID, location)
Place an OraxenFurniture at a given location, optionally setting a player for rotation purposes
OraxenFurniture.place(itemID, location, @Nullable player)
ResourcePack.getAssetsFolder();
Oraxen allows you to add your own mechanics to the plugin, it is a little bit more complex than the rest, that's why there is a dedicated tutorial.
Last modified 1mo ago