Package org.bukkit.boss
Interface DragonBattle
public interface DragonBattle
Represents a dragon battle state for a world with an end environment.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents a phase in the dragon respawn process.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangenerateEndPortal(boolean withPortals) Generate the end portal.Get the boss bar to be displayed for this dragon battle.Get theEnderDragonactive in this battle.Get the location of the end portal.Get this battle's current respawn phase.booleanCheck whether the first dragon has been killed already.voidTry to initiate a respawn sequence to summon the dragon as though a player has placed 4 end crystals on the portal.booleaninitiateRespawn(Collection<EnderCrystal> enderCrystals) Try to initiate a respawn sequence to summon the dragon.voidReset the crystals located on the obsidian pillars (remove their beam targets and invulnerability).voidsetPreviouslyKilled(boolean previouslyKilled) Sets whether the first dragon has been killed already.booleanSet the dragon's respawn phase.
- 
Method Details- 
getEnderDragonGet theEnderDragonactive in this battle.
 Will return null if the dragon has been slain.- Returns:
- the ender dragon. null if dead
 
- 
getBossBarGet the boss bar to be displayed for this dragon battle.- Returns:
- the boss bar
 
- 
getEndPortalLocationGet 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
 
- 
generateEndPortalboolean generateEndPortal(boolean withPortals) Generate the end portal.- Parameters:
- withPortals- whether end portal blocks should be generated
- Returns:
- true if generated, false if already present
 
- 
hasBeenPreviouslyKilledboolean hasBeenPreviouslyKilled()Check whether the first dragon has been killed already.- Returns:
- true if killed before, false otherwise
 
- 
setPreviouslyKilledvoid setPreviouslyKilled(boolean previouslyKilled) Sets whether the first dragon has been killed already.
 If the dragon has not previously been killed, a portal will be generated when it is finally killed.- Parameters:
- previouslyKilled- true if the dragon has been killed before, false otherwise
 
- 
initiateRespawnvoid initiateRespawn()Try to initiate a respawn sequence to summon the dragon as though a player has placed 4 end crystals on the portal.
- 
initiateRespawnTry to initiate a respawn sequence to summon the dragon.- Parameters:
- enderCrystals- the- EnderCrystalsto use in the respawn, or a null or empty list to render the respawn sequence uncancellable. null entries or crystals that do not reside in the same world as this dragon battle will be ignored.
- Returns:
- true if the respawn was initiated, false otherwise.
 
- 
getRespawnPhaseGet this battle's current respawn phase.- Returns:
- the current respawn phase.
 
- 
setRespawnPhaseSet 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:
 
- 
resetCrystalsvoid resetCrystals()Reset the crystals located on the obsidian pillars (remove their beam targets and invulnerability).
 
-