Class SheepWarsAPI


  • public class SheepWarsAPI
    extends java.lang.Object
    This wonderful class allows you to fully take control on the plugin UltimateSheepWars.
    Author:
    Roytreo28
    • Field Detail

      • SHEEPWARS_SHEEP_ID_METADATA

        public static final java.lang.String SHEEPWARS_SHEEP_ID_METADATA
        The Sheepwars Sheep Name is an instance of the class Message.
        See Also:
        Constant Field Values
      • SHEEPWARS_SHEEP_LAUNCHER_METADATA

        public static final java.lang.String SHEEPWARS_SHEEP_LAUNCHER_METADATA
        See Also:
        Constant Field Values
      • SHEEPWARS_API_PREFIX

        public static final java.lang.String SHEEPWARS_API_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • SheepWarsAPI

        private SheepWarsAPI()
    • Method Detail

      • registerSheep

        public static boolean registerSheep​(SheepWarsSheep sheepClass)
        Register your custom sheep.
        Parameters:
        sheepClass - Instance of your sheep class.
        Returns:
        true if no error happens.
        Throws:
        fr.royalpha.sheepwars.core.exception.ConfigFileNotSet - IOException
      • unregisterSheep

        public static boolean unregisterSheep​(SheepWarsSheep sheepClass)
        Unregister your custom sheep.
        Parameters:
        sheepClass - Instance of your sheep class.
        Returns:
        true if your sheep was unregistered.
      • unregisterAllSheeps

        public static int unregisterAllSheeps()
        Unregister all registred sheeps.
        Returns:
        number of sheep classes that have been erased.
      • registerKit

        public static boolean registerKit​(SheepWarsKit kitClass,
                                          org.bukkit.plugin.Plugin owningPlugin)
        Register your custom kit.
        Parameters:
        kitClass - Instance of your kit class.
        owningPlugin - Custom kit plugin instance (your plugin instance).
        Returns:
        true if no error happens.
        Throws:
        fr.royalpha.sheepwars.core.exception.ConfigFileNotSet - IOException
      • unregisterKit

        public static boolean unregisterKit​(SheepWarsKit kitClass)
        Unregister your custom kit.
        Parameters:
        kitClass - Instance of your kit class.
        Returns:
        true if your kit was unregistered.
      • unregisterAllKits

        public static int unregisterAllKits()
        Unregister all registred kits.
        Returns:
        number of kit classes that have been erased.
      • registerBooster

        public static boolean registerBooster​(SheepWarsBooster boosterClass)
        Register your custom booster.
        Parameters:
        boosterClass - Instance of your booster class.
        Returns:
        true if no error happens.
        Throws:
        fr.royalpha.sheepwars.core.exception.ConfigFileNotSet - IOException
      • unregisterBooster

        public static boolean unregisterBooster​(SheepWarsBooster boosterClass)
        Unregister your custom booster.
        Parameters:
        boosterClass - Instance of your booster class.
        Returns:
        true if your booster was unregistered.
      • unregisterAllBoosters

        public static int unregisterAllBoosters()
        Unregister all registred boosters.
        Returns:
        number of booster classes that have been erased.
      • setKitsInventory

        public static void setKitsInventory​(java.lang.Class<? extends GuiScreen> kitsInventory)
        Set your own inventory class to display kits.
        Parameters:
        kitsInventory - Inventory class.
      • registerKits

        public static void registerKits​(org.bukkit.plugin.Plugin owningPlugin,
                                        SheepWarsKit... classes)
        Register several kits.
      • registerBoosters

        public static void registerBoosters​(SheepWarsBooster... classes)
        Register several boosters.
      • registerSheeps

        public static void registerSheeps​(SheepWarsSheep... classes)
        Register several sheeps.
      • unregisterKits

        public static void unregisterKits​(SheepWarsKit... classes)
        Unregister several kits.
      • unregisterBoosters

        public static void unregisterBoosters​(SheepWarsBooster... classes)
        Unregister several boosters.
      • unregisterSheeps

        public static void unregisterSheeps​(SheepWarsSheep... classes)
        Unregister several sheeps.
      • registerCalendarEvent

        public static void registerCalendarEvent​(org.bukkit.plugin.Plugin owningPlugin,
                                                 CalendarEvent calendarEvent)
      • registerCalendarEvents

        public static void registerCalendarEvents​(org.bukkit.plugin.Plugin owningPlugin,
                                                  CalendarEvent... calendarEvents)
      • unregisterCalendarEvent

        public static void unregisterCalendarEvent​(CalendarEvent calendarEvent)
      • unregisterCalendarEvents

        public static void unregisterCalendarEvents​(CalendarEvent... calendarEvents)