#482: Add a DragonBattle API to manipulate respawn phases etc

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot
2020-03-24 19:53:44 +11:00
parent aec6ad036b
commit 48bc105f6f
3 changed files with 156 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import java.util.function.Predicate;
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.boss.DragonBattle;
import org.bukkit.entity.AbstractArrow;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
@@ -2241,6 +2242,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull
public List<Raid> getRaids();
/**
* Get the {@link DragonBattle} associated with this world.
*
* If this world's environment is not {@link Environment#THE_END}, null will
* be returned.
* <p>
* If an end world, a dragon battle instance will be returned regardless of
* whether or not a dragon is present in the world or a fight sequence has
* been activated. The dragon battle instance acts as a state holder.
*
* @return the dragon battle instance
*/
@Nullable
public DragonBattle getEnderDragonBattle();
/**
* Represents various map environment types that a world may be
*/