Plugin Library v1.2.2

Allows developers to get a lot of data from other plugins without importing the API's themselves.

  1. Staartvin
    Native Minecraft Version:
    1.14
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    Contributors:
    Staartvin
    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.3
    • UltimateCore 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
    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");

Recent Updates

  1. Support for MC 1.14
  2. Update for Minecraft 1.13
  3. Support for new plugins

Recent Reviews

  1. DrOreo002
    DrOreo002
    5/5,
    Version: v1.2.2
    8k downloads without any reviews?. Ok

    I'll ruin your record now hahahahaahhahahaha
    1. Staartvin
      Author's Response
      Hehe, thanks! Great you're giving it five stars instead of one ;P