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 Type
    Method
    Description
    void
    applyBoost(@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.
    void
    applyBoost(@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.
    void
    applyRawBoost(@NotNull org.bukkit.entity.Player player)
    Applies a spawn-elytra boost to the given player using default values, without marking them as boosted.
    void
    applyRawBoost(@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.
    boolean
    hasBoosted(@NotNull org.bukkit.entity.Entity entity)
    Checks whether the given entity has already used a boost during their current flight session.
    boolean
    hasBoosted(@NotNull org.bukkit.entity.Player player)
    Checks whether the given player has already used a boost during their current flight session.
    boolean
    Checks whether the spawn-elytra feature is currently enabled according to BuildMC's configuration.
    boolean
    isInElytraZone(@NotNull org.bukkit.Location location)
    Checks if the given location is inside a spawn-elytra zone.
    boolean
    isInElytraZone(@NotNull org.bukkit.entity.Player player)
    Checks if the given player is currently inside a spawn-elytra zone.
    boolean
    isUsingSpawnElytra(@NotNull org.bukkit.entity.Entity entity)
    Checks if the given entity is currently flying with spawn-elytra.
    boolean
    isUsingSpawnElytra(@NotNull org.bukkit.entity.Player player)
    Checks if the given player is currently flying with spawn-elytra.
    void
    registerZone(@NotNull org.bukkit.Location pos1, @NotNull org.bukkit.Location pos2, @NotNull org.bukkit.World world)
    Registers or replaces the active spawn-elytra zone.
    void
    resetBoost(@NotNull org.bukkit.entity.Entity entity)
    Resets the "boost used" flag for the given entity, allowing them to boost again within the same flight.
    void
    resetBoost(@NotNull org.bukkit.entity.Player player)
    Resets the "boost used" flag for the given player, allowing them to boost again within the same flight.
    void
    setPlayerFlying(@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 zone
      pos2 - the opposite corner of the zone
      world - 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 modify
      flying - 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 boost
      multiplier - the velocity multiplier
      verticalVelocity - 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 boost
      multiplier - the velocity multiplier
      verticalVelocity - 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