Package fr.royalpha.sheepwars.api
Class SheepWarsAPI
- java.lang.Object
-
- fr.royalpha.sheepwars.api.SheepWarsAPI
-
public class SheepWarsAPI extends java.lang.Object
This 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.String
SHEEPWARS_API_PREFIX
static java.lang.String
SHEEPWARS_SHEEP_ID_METADATA
The Sheepwars Sheep Name is an instance of the class Message.static java.lang.String
SHEEPWARS_SHEEP_LAUNCHER_METADATA
-
Constructor Summary
Constructors Modifier Constructor Description private
SheepWarsAPI()
-
Method Summary
Modifier and Type Method Description static boolean
registerBooster(SheepWarsBooster boosterClass)
Register your custom booster.static void
registerBoosters(SheepWarsBooster... classes)
Register several boosters.static void
registerCalendarEvent(org.bukkit.plugin.Plugin owningPlugin, CalendarEvent calendarEvent)
static void
registerCalendarEvents(org.bukkit.plugin.Plugin owningPlugin, CalendarEvent... calendarEvents)
static boolean
registerKit(SheepWarsKit kitClass, org.bukkit.plugin.Plugin owningPlugin)
Register your custom kit.static void
registerKits(org.bukkit.plugin.Plugin owningPlugin, SheepWarsKit... classes)
Register several kits.static boolean
registerSheep(SheepWarsSheep sheepClass)
Register your custom sheep.static void
registerSheeps(SheepWarsSheep... classes)
Register several sheeps.static void
setKitsInventory(java.lang.Class<? extends GuiScreen> kitsInventory)
Set your own inventory class to display kits.static int
unregisterAllBoosters()
Unregister all registred boosters.static int
unregisterAllKits()
Unregister all registred kits.static int
unregisterAllSheeps()
Unregister all registred sheeps.static boolean
unregisterBooster(SheepWarsBooster boosterClass)
Unregister your custom booster.static void
unregisterBoosters(SheepWarsBooster... classes)
Unregister several boosters.static void
unregisterCalendarEvent(CalendarEvent calendarEvent)
static void
unregisterCalendarEvents(CalendarEvent... calendarEvents)
static boolean
unregisterKit(SheepWarsKit kitClass)
Unregister your custom kit.static void
unregisterKits(SheepWarsKit... classes)
Unregister several kits.static boolean
unregisterSheep(SheepWarsSheep sheepClass)
Unregister your custom sheep.static void
unregisterSheeps(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)
-
-