Class ClaimFlySession
java.lang.Object
me.tayebyassine.homestead.sessions.ClaimFlySession
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisable claim-fly mode for all online players and revoke their flight ability.static booleanhasSession(org.bukkit.entity.Player player) Check whether the given player is in claim-fly mode.static voidnewSession(org.bukkit.entity.Player player) Enable claim-fly mode for the given player.static voidremoveSession(org.bukkit.entity.Player player) Disable claim-fly mode for the given player and revoke their flight ability.
-
Field Details
-
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:
trueif 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.
-