Extras

What is Extras? An open source, modular, lightweight, library which contains a large set of both useful and advanced methods for plugin developers.
To make use of the library you will first need to import it. You can do this in Eclipse by right-clicking on your src folder. Then select General > File System and import the source folder from "YourSavedPath/Extras-Library/Extras/src".
Extras library contains the following packages: couk.Adamki11s.Extras.Colour; couk.Adamki11s.Extras.Cryptography; couk.Adamki11s.Extras.Events; couk.Adamki11s.Extras.Extras; couk.Adamki11s.Extras.Inventory; couk.Adamki11s.Extras.Player; couk.Adamki11s.Extras.Random; couk.Adamki11s.Extras.Regions; couk.Adamki11s.Extras.Scheduler; couk.Adamki11s.Extras.Terrain; couk.Adamki11s.Extras.Trace;
I have added extensive Java Docs to all of the methods so I won't go over what they do in this thread but only how to hook into those classes and access those events. Each class and it's methods extend an abstract class so you can hook into it very easily:
ExtrasColour extrasColour = new ExtrasColour(); ExtrasCryptography extrasCrypt = new ExtrasCryptography(); ExtrasEvents extrasEvents = new ExtrasEvents(); ExtrasInventory extrasInventory = new ExtrasInventory(); ExtrasPlayer extrasPlayer = new ExtrasPlayer(); ExtrasRandom extrasRandom = new ExtrasRandom(); ExtrasRegions extrasRegions = new ExtrasRegions(); ExtrasScheduler extrasScheduler = new ExtrasScheduler(); ExtrasTerrain extrasTerrain = new ExtrasRegions(); ExtrasTrace extrasTrace = new ExtrasTrace();
But before hooking into these methods you should hook into the core first which consists of a constructor with your plugin name which will help identify errors whilst sending player messages if a null parameter is passed. This is done easily like so :
Extras ex = new Extras("YourPluginName");
I'd recommend doing this inside onEnable or before you make an API calls to Extra's.
ChangeLog: Version 1.1 : Added Scheduler library and a few additional methods. Version 1.0 : Initial Release

Comments