Package me.metallicgoat.tweaksaddon.api
Class GenTiersAPI
java.lang.Object
me.metallicgoat.tweaksaddon.api.GenTiersAPI
Represents the API to interact with the Gen Tiers system of MBedwars Tweaks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<SuddenDeathDragon> Get all existing dragons.static List<SuddenDeathDragon> getDragons(Arena arena) Get the dragons for arena.static List<SuddenDeathDragon> getDragons(Arena arena, Team team) Get the dragons for a specific team in an arena.static @Nullable GenTierLevelGet the first Gen Tier (level 1)static @Nullable GenTierHandlergetHandlerById(String id) Gets a GenTierHandler by its idstatic Collection<GenTierHandler> Get all registered GenTierHandlersstatic @Nullable GenTierStateGet the GenTierState of an arena Will returnnullif the gen tier system is not running in the specified arenastatic UpgradeTriggerHandlerGet the trigger handler used for the sudden death team upgrade.static @Nullable GenTierLevelgetTier(int level) Get a specific Gen Tier by its levelstatic Collection<GenTierLevel> getTiers()Get all configured Gen Tiersstatic voidregisterHandler(GenTierHandler handler) Register a custom GenTierHandler!static voidReloads the gen-tiers config and applies any changes made to itstatic voidUnregisters a Gen Tier Handler.
-
Constructor Details
-
GenTiersAPI
public GenTiersAPI()
-
-
Method Details
-
getDragons
Get the dragons for a specific team in an arena.- Parameters:
arena- The arena which we are truing to get the dragonsteam- The team which the dragon belongs to- Returns:
- A list of actively running SuddenDeathDragons
-
getDragons
Get the dragons for arena.- Parameters:
arena- The arena which we are truing to get the dragons- Returns:
- A list of actively running SuddenDeathDragons
-
getDragons
Get all existing dragons.- Returns:
- A list of actively running SuddenDeathDragons
-
getState
Get the GenTierState of an arena Will returnnullif the gen tier system is not running in the specified arena- Parameters:
arena- the arena where we are grabbing the GenTierState from- Returns:
- The GenTierState of the corresponding arena
-
getTiers
Get all configured Gen Tiers- Returns:
- An unmodifiable collection of all configured Gen Tiers
-
getTier
Get a specific Gen Tier by its level- Parameters:
level- The level of the Gen Tier you are trying to get- Returns:
- The Gen Tier of the corresponding level
-
getFirstTier
Get the first Gen Tier (level 1)- Returns:
- The Gen Tier of level 1
-
registerHandler
Register a custom GenTierHandler! You will need to implement the GenTierHandler- Parameters:
handler- The GenTier you are registering
-
unregisterHandler
Unregisters a Gen Tier Handler. Using this you could replace internal handlers- Parameters:
id- The id of the handler
-
getHandlerById
Gets a GenTierHandler by its id- Parameters:
id- The id of the handler
-
getHandlers
Get all registered GenTierHandlers- Returns:
- all registered GenTierHandlers
-
getSuddenDeathUpgrade
Get the trigger handler used for the sudden death team upgrade.- Returns:
- The singletone UpgradeTriggerHandler instance for the sudden death upgrade
-
reloadConfig
public static void reloadConfig()Reloads the gen-tiers config and applies any changes made to itNote: This will NOT update any arenas that are currently running the gen tier system, and as a result might cause weird states for active arenas. Runs IO on the same thread that it was called on.
-