Package fr.royalpha.sheepwars.api
Class SheepWarsAPI
- java.lang.Object
-
- fr.royalpha.sheepwars.api.SheepWarsAPI
-
public class SheepWarsAPI extends java.lang.ObjectThis wonderful class allows you to fully take control on the plugin UltimateSheepWars.- Author:
- Roytreo28
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSHEEPWARS_API_PREFIXstatic java.lang.StringSHEEPWARS_SHEEP_ID_METADATAThe Sheepwars Sheep Name is an instance of the class Message.static java.lang.StringSHEEPWARS_SHEEP_LAUNCHER_METADATA
-
Constructor Summary
Constructors Modifier Constructor Description privateSheepWarsAPI()
-
Method Summary
Modifier and Type Method Description static booleanregisterBooster(SheepWarsBooster boosterClass)Register your custom booster.static voidregisterBoosters(SheepWarsBooster... classes)Register several boosters.static voidregisterCalendarEvent(org.bukkit.plugin.Plugin owningPlugin, CalendarEvent calendarEvent)static voidregisterCalendarEvents(org.bukkit.plugin.Plugin owningPlugin, CalendarEvent... calendarEvents)static booleanregisterKit(SheepWarsKit kitClass, org.bukkit.plugin.Plugin owningPlugin)Register your custom kit.static voidregisterKits(org.bukkit.plugin.Plugin owningPlugin, SheepWarsKit... classes)Register several kits.static booleanregisterSheep(SheepWarsSheep sheepClass)Register your custom sheep.static voidregisterSheeps(SheepWarsSheep... classes)Register several sheeps.static voidsetKitsInventory(java.lang.Class<? extends GuiScreen> kitsInventory)Set your own inventory class to display kits.static intunregisterAllBoosters()Unregister all registred boosters.static intunregisterAllKits()Unregister all registred kits.static intunregisterAllSheeps()Unregister all registred sheeps.static booleanunregisterBooster(SheepWarsBooster boosterClass)Unregister your custom booster.static voidunregisterBoosters(SheepWarsBooster... classes)Unregister several boosters.static voidunregisterCalendarEvent(CalendarEvent calendarEvent)static voidunregisterCalendarEvents(CalendarEvent... calendarEvents)static booleanunregisterKit(SheepWarsKit kitClass)Unregister your custom kit.static voidunregisterKits(SheepWarsKit... classes)Unregister several kits.static booleanunregisterSheep(SheepWarsSheep sheepClass)Unregister your custom sheep.static voidunregisterSheeps(SheepWarsSheep... classes)Unregister several sheeps.
-
-
-
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
-
-
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)
-
-