HomeJavaModsPlugin Library
Plugin Library
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:
HOW TO USE (AS A DEVELOPER):
To use Plugin Library, you'll have to add a 'depend' in your plugin.yml.
Like this: [​IMG] .

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
Code (Text):
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
Code (Text):
PluginLibrary.getLibrary(String pluginName);
.

EXAMPLE:
We want to know the archery level (mcMMO) of a specific player.
First, we get the LibraryHook:

Code (Text):

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");

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Plugin Library is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 24,493 times (via Spigot). Download it and open it directly in the game.

Explore more