Plugin Library
v1.2.4Allows developers to get a lot of data from other plugins without importing the API's themselves.
Plugin Library
DESCRIPTION:
Plugin Library is a plugin that allows developers to use the API's of other plugins without the need of importing the plugin itself onto the classpath. Plugin Library was created because the plugin Autorank loaded into a lot of different plugins. This resulted in a big clumsy mess of imports from all kinds of different plugins. To solve this issue, we created Plugin Library to manage all the connections to other API's. Since other developers may also find this handy, we decided to make it publicly available.
FEATURES:
Automatically hooks into all plugins that it supports. Developers just have to hook into Plugin Library to use its API.
HOW TO USE (AS A SERVER OWNER):
Just download and drop this plugin into your plugins folder. It will do its magic from there!
CURRENTLY SUPPORTS:
Plugin Library currently supports these APIs:
- AFKTerminator v3.0.8
- Autorank v4.2.6
- Factions v2.14.0
- mcMMO v2.1.111
- OnTime v4.1.4
- RoyalCommands v4.1.1
Stats v5.3.3UltimateCore v2.1.16- RPGme v1.0.2
- AdvancedAchievements v5.13.1
- GriefPrevention v16.12.0
- WorldGuard v7.0.1
- WorldEdit v7.0.1
- uSkyBlock v2.8.5
- Quests v3.8.1
- EssentialsX v2.17.1
- BattleLevels v8.2.2
- ASkyBlock v3.0.9.4
- AcidIsland v3.0.9.4
- Jobs v4.14.3
- Vault 1.7
- Statz 1.5.3
- CMI 8.6.16.4
HOW TO USE (AS A DEVELOPER):
To use Plugin Library, you'll have to add a 'depend' in your plugin.yml.
Like this:
.
Once you've done that, you can get access to the API of a plugin in two ways:
1. If you want to be sure that the plugin you're trying to reach is supported by Plugin Library, you can use
PluginLibrary.getLibrary(Library lib);
. Library is an enum, which is provided by the me.staartvin.plugins.pluginlibrary.Library class.
2. If you only know the (String) name of a library, you can use
PluginLibrary.getLibrary(String pluginName);
.
EXAMPLE:
We want to know the archery level (mcMMO) of a specific player.
First, we get the LibraryHook:
LibraryHook hook = PluginLibrary.getLibrary(Library.MCMMO);
McMMOHook mcmmoHook = (McMMOHook) hook;
// To get useful information off of a hook, we need to cast it to a specific plugin.
int archeryLevel = mcmmoHook.getLevel(player, "archery");Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta