Class ClaimFlySession

java.lang.Object
me.tayebyassine.homestead.sessions.ClaimFlySession

public final class ClaimFlySession extends Object
Tracks which players are in claim-fly mode.

When a player has an active session, they are allowed to fly within their claimed regions. Flight is revoked when the player leaves a claimed region, toggles the command off, or the plugin disables.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final HashSet<UUID>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Disable claim-fly mode for all online players and revoke their flight ability.
    static boolean
    hasSession(org.bukkit.entity.Player player)
    Check whether the given player is in claim-fly mode.
    static void
    newSession(org.bukkit.entity.Player player)
    Enable claim-fly mode for the given player.
    static void
    removeSession(org.bukkit.entity.Player player)
    Disable claim-fly mode for the given player and revoke their flight ability.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SESSIONS

      public static final HashSet<UUID> SESSIONS
  • Method Details

    • newSession

      public static void newSession(org.bukkit.entity.Player player)
      Enable claim-fly mode for the given player.
      Parameters:
      player - the player to enable claim-fly for
    • hasSession

      public static boolean hasSession(org.bukkit.entity.Player player)
      Check whether the given player is in claim-fly mode.
      Parameters:
      player - the player to check
      Returns:
      true if the player has an active claim-fly session
    • removeSession

      public static void removeSession(org.bukkit.entity.Player player)
      Disable claim-fly mode for the given player and revoke their flight ability.
      Parameters:
      player - the player to disable claim-fly for
    • cleanupAll

      public static void cleanupAll()
      Disable claim-fly mode for all online players and revoke their flight ability.

      Called during plugin shutdown to ensure no player is left flying after the plugin disables.