Oraxen
Search…
Add Compatibility with a plugin
Make Oraxen compatible with other plugins directly from the oraxen source code

How does it work?

First Step: create a compatibility class

You need to create a class that extends
1
CompatibilityProvider<Main class of the plugin you want to add support>
Copied!
and put the codes which add support for the plugin in the class you created.

Second Step: add the compatibility class to Oraxen

Use
1
CompatibilitiesManager.addCompatibility(name of the plugin you want to add support, class you created in first step)
Copied!
to add the class to Oraxen.

Example

I'll use MythicMobs for this example.

First Step: create a compatibility class

1
import io.lumine.xikage.mythicmobs.MythicMobs;
2
import io.lumine.xikage.mythicmobs.api.bukkit.events.MythicDropLoadEvent;
3
import io.th0rgal.oraxen.compatibilities.CompatibilityProvider;
4
5
public class MythicMobsCompatibility extends CompatibilityProvider<MythicMobs>{
6
7
@EventHandler
8
public void onMythicDropLoadEvent(MythicDropLoadEvent event) {
9
10
}
11
12
}
Copied!

Second Step: add the compatibility class to Oraxen

1
import io.th0rgal.oraxen.compatibilities.CompatibilitiesManager;
2
import org.bukkit.plugin.java.JavaPlugin;
3
4
public class OraxenMythicMobsCompatibilityPlugin extends JavaPlugin {
5
6
public void onEnable() {
7
CompatibilitiesManager.addCompatibility("MythicMobs", MythicMobsCompatibility.class)
8
}
9
10
}
11
Copied!
Last modified 1yr ago