Package org.bukkit.boss
Interface DragonBattle
-
public interface DragonBattleRepresents a dragon battle state for a world with an end environment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDragonBattle.RespawnPhaseRepresents a phase in the dragon respawn process.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangenerateEndPortal(boolean withPortals)Generate the end portal.BossBargetBossBar()Get the boss bar to be displayed for this dragon battle.EnderDragongetEnderDragon()Get theEnderDragonactive in this battle.LocationgetEndPortalLocation()Get the location of the end portal.DragonBattle.RespawnPhasegetRespawnPhase()Get this battle's current respawn phase.booleanhasBeenPreviouslyKilled()Check whether or not the first dragon has been killed already.voidinitiateRespawn()Initiate a respawn sequence to summon the dragon as though a player has placed 4 end crystals on the portal.voidresetCrystals()Reset the crystals located on the obsidian pillars (remove their beam targets and invulnerability).booleansetRespawnPhase(DragonBattle.RespawnPhase phase)Set the dragon's respawn phase.
-
-
-
Method Detail
-
getEnderDragon
@Nullable EnderDragon getEnderDragon()
Get theEnderDragonactive in this battle. Will return null if the dragon has been slain.- Returns:
- the ender dragon. null if dead
-
getBossBar
@NotNull BossBar getBossBar()
Get the boss bar to be displayed for this dragon battle.- Returns:
- the boss bar
-
getEndPortalLocation
@Nullable Location getEndPortalLocation()
Get the location of the end portal. This location will be at the center of the base (bottom) of the portal.- Returns:
- the end portal location or null if not generated
-
generateEndPortal
boolean generateEndPortal(boolean withPortals)
Generate the end portal.- Parameters:
withPortals- whether or not end portal blocks should be generated- Returns:
- true if generated, false if already present
-
hasBeenPreviouslyKilled
boolean hasBeenPreviouslyKilled()
Check whether or not the first dragon has been killed already.- Returns:
- true if killed before, false otherwise
-
initiateRespawn
void initiateRespawn()
Initiate a respawn sequence to summon the dragon as though a player has placed 4 end crystals on the portal.
-
getRespawnPhase
@NotNull DragonBattle.RespawnPhase getRespawnPhase()
Get this battle's current respawn phase.- Returns:
- the current respawn phase.
-
setRespawnPhase
boolean setRespawnPhase(@NotNull DragonBattle.RespawnPhase phase)
Set the dragon's respawn phase. This method will is unsuccessful if a dragon respawn is not in progress.- Parameters:
phase- the phase to set- Returns:
- true if successful, false otherwise
- See Also:
initiateRespawn()
-
resetCrystals
void resetCrystals()
Reset the crystals located on the obsidian pillars (remove their beam targets and invulnerability).
-
-