[DEV] Extras v1.1 - Additional useful and advanced methods for plugin developers [1.0.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by Adamki11s, Jul 13, 2011.

  1. [​IMG]
    Extra's
    Version 1.1[1.0.1-R1]

    What is Extras? An open source, modular, lightweight, library which contains a large set of both useful and advanced methods for plugin developers.

    If you have any suggestions, would like to report a bug or request a feature then please don't hesitate :).

    [​IMG]


    [​IMG]


    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:
    PHP:
    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:
    PHP:
    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 :
    PHP:
    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
     
    iPhysX, zhuowei and JWhy like this.
  2. Offline

    bitWolfy

    Mmm... Does this even work still?
    Last update was, well, 10 months ago :)
     

Share This Page