Interface ElytraManager
public interface ElytraManager
API for interacting with BuildMC's spawn-elytra system.
Spawn-elytra allows players to glide and boost within a defined region even if they do not have an actual elytra equipped.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyBoost(@NotNull org.bukkit.entity.Player player) Applies a spawn-elytra boost to the given player using default multiplier and vertical velocity values, and marks them as boosted.voidapplyBoost(@NotNull org.bukkit.entity.Player player, int multiplier, double verticalVelocity) Applies a spawn-elytra boost to the given player and marks them as having boosted for this flight session.voidapplyRawBoost(@NotNull org.bukkit.entity.Player player) Applies a spawn-elytra boost to the given player using default values, without marking them as boosted.voidapplyRawBoost(@NotNull org.bukkit.entity.Player player, int multiplier, double verticalVelocity) Applies a spawn-elytra boost to the given player without marking them as boosted, allowing multiple boosts per flight.booleanhasBoosted(@NotNull org.bukkit.entity.Entity entity) Checks whether the given entity has already used a boost during their current flight session.booleanhasBoosted(@NotNull org.bukkit.entity.Player player) Checks whether the given player has already used a boost during their current flight session.booleanChecks whether the spawn-elytra feature is currently enabled according to BuildMC's configuration.booleanisInElytraZone(@NotNull org.bukkit.Location location) Checks if the given location is inside a spawn-elytra zone.booleanisInElytraZone(@NotNull org.bukkit.entity.Player player) Checks if the given player is currently inside a spawn-elytra zone.booleanisUsingSpawnElytra(@NotNull org.bukkit.entity.Entity entity) Checks if the given entity is currently flying with spawn-elytra.booleanisUsingSpawnElytra(@NotNull org.bukkit.entity.Player player) Checks if the given player is currently flying with spawn-elytra.voidregisterZone(@NotNull org.bukkit.Location pos1, @NotNull org.bukkit.Location pos2, @NotNull org.bukkit.World world) Registers or replaces the active spawn-elytra zone.voidresetBoost(@NotNull org.bukkit.entity.Entity entity) Resets the "boost used" flag for the given entity, allowing them to boost again within the same flight.voidresetBoost(@NotNull org.bukkit.entity.Player player) Resets the "boost used" flag for the given player, allowing them to boost again within the same flight.voidsetPlayerFlying(@NotNull org.bukkit.entity.Player player, boolean flying) Grants or revokes spawn-elytra flight for a player.
-
Method Details
-
isElytraEnabled
boolean isElytraEnabled()Checks whether the spawn-elytra feature is currently enabled according to BuildMC's configuration.- Returns:
- true if spawn-elytra is enabled, false otherwise
-
isInElytraZone
boolean isInElytraZone(@NotNull @NotNull org.bukkit.entity.Player player) Checks if the given player is currently inside a spawn-elytra zone.- Parameters:
player- the player to check- Returns:
- true if the player is inside a spawn-elytra zone
-
isInElytraZone
boolean isInElytraZone(@NotNull @NotNull org.bukkit.Location location) Checks if the given location is inside a spawn-elytra zone.- Parameters:
location- the location to check- Returns:
- true if the location is inside a spawn-elytra zone
-
registerZone
void registerZone(@NotNull @NotNull org.bukkit.Location pos1, @NotNull @NotNull org.bukkit.Location pos2, @NotNull @NotNull org.bukkit.World world) Registers or replaces the active spawn-elytra zone. The zone is defined as the cuboid between two corner positions.- Parameters:
pos1- the first corner of the zonepos2- the opposite corner of the zoneworld- the world the zone belongs to
-
setPlayerFlying
void setPlayerFlying(@NotNull @NotNull org.bukkit.entity.Player player, boolean flying) Grants or revokes spawn-elytra flight for a player.- Parameters:
player- the player to modifyflying- true to enable flight, false to disable
-
isUsingSpawnElytra
boolean isUsingSpawnElytra(@NotNull @NotNull org.bukkit.entity.Player player) Checks if the given player is currently flying with spawn-elytra.- Parameters:
player- the player to check- Returns:
- true if the player is using spawn-elytra flight
-
isUsingSpawnElytra
boolean isUsingSpawnElytra(@NotNull @NotNull org.bukkit.entity.Entity entity) Checks if the given entity is currently flying with spawn-elytra.- Parameters:
entity- the entity to check- Returns:
- true if the entity is using spawn-elytra flight
-
hasBoosted
boolean hasBoosted(@NotNull @NotNull org.bukkit.entity.Player player) Checks whether the given player has already used a boost during their current flight session.- Parameters:
player- the player to check- Returns:
- true if the player has already boosted
-
hasBoosted
boolean hasBoosted(@NotNull @NotNull org.bukkit.entity.Entity entity) Checks whether the given entity has already used a boost during their current flight session.- Parameters:
entity- the entity to check- Returns:
- true if the entity has already boosted
-
resetBoost
void resetBoost(@NotNull @NotNull org.bukkit.entity.Player player) Resets the "boost used" flag for the given player, allowing them to boost again within the same flight.Does not remove the current boost effect, only resets the metadata.
- Parameters:
player- the player whose boost state should be reset
-
resetBoost
void resetBoost(@NotNull @NotNull org.bukkit.entity.Entity entity) Resets the "boost used" flag for the given entity, allowing them to boost again within the same flight.Does not remove the current boost effect, only resets the metadata.
- Parameters:
entity- the entity whose boost state should be reset
-
applyBoost
void applyBoost(@NotNull @NotNull org.bukkit.entity.Player player, int multiplier, double verticalVelocity) Applies a spawn-elytra boost to the given player and marks them as having boosted for this flight session.- Parameters:
player- the player to boostmultiplier- the velocity multiplierverticalVelocity- the vertical velocity to apply
-
applyBoost
void applyBoost(@NotNull @NotNull org.bukkit.entity.Player player) Applies a spawn-elytra boost to the given player using default multiplier and vertical velocity values, and marks them as boosted.- Parameters:
player- the player to boost
-
applyRawBoost
void applyRawBoost(@NotNull @NotNull org.bukkit.entity.Player player, int multiplier, double verticalVelocity) Applies a spawn-elytra boost to the given player without marking them as boosted, allowing multiple boosts per flight.- Parameters:
player- the player to boostmultiplier- the velocity multiplierverticalVelocity- the vertical velocity to apply
-
applyRawBoost
void applyRawBoost(@NotNull @NotNull org.bukkit.entity.Player player) Applies a spawn-elytra boost to the given player using default values, without marking them as boosted.- Parameters:
player- the player to boost
-