Package me.hsgamer.minigamecore.bukkit
Class BukkitArena
java.lang.Object
me.hsgamer.minigamecore.base.FeatureUnit
me.hsgamer.minigamecore.base.Arena
me.hsgamer.minigamecore.bukkit.BukkitArena
- All Implemented Interfaces:
Runnable
,Initializer
- Direct Known Subclasses:
MineLibArena
,SimpleBukkitArena
The
Arena
for Bukkit-
Constructor Summary
ConstructorDescriptionBukkitArena
(List<FeatureUnit> parentList) Create a new arenaBukkitArena
(FeatureUnit... parent) Create a new arena -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
callStateChanged
(GameState oldStage, GameState newStage) This is called when the state is changed.boolean
isAsync()
Whether the task is async or not.Methods inherited from class me.hsgamer.minigamecore.base.Arena
clear, clearArena, getCurrentState, getCurrentStateInstance, getNextState, getNextStateInstance, init, initArena, isValid, loadFeatures, loadGameStates, postInit, postInitArena, run, setNextState
Methods inherited from class me.hsgamer.minigamecore.base.FeatureUnit
getFeature, getFeatures, getGameState, getGameStates, getParent, getParentList
-
Constructor Details
-
BukkitArena
Create a new arena- Parameters:
parentList
- the parentFeatureUnit
list
-
BukkitArena
Create a new arena- Parameters:
parent
- the parentFeatureUnit
-
-
Method Details
-
isAsync
public boolean isAsync()Whether the task is async or not. Default is true- Returns:
- true if the task is async
-
callStateChanged
Description copied from class:Arena
This is called when the state is changed. This is usually used to do actions on state changed. If you did change the state withArena.setNextState(Class)
, set the return value to false.- Overrides:
callStateChanged
in classArena
- Parameters:
oldStage
- the old statenewStage
- the new state- Returns:
- true if the change is successful, otherwise false
-