Class TownRuinUtil
java.lang.Object
com.palmergames.bukkit.towny.utils.TownRuinUtil
This class contains utility functions related to ruins
- Author:
- Goosius
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddRuinedComponents(Town town, StatusScreen screen, Translator translator) static voidThis method cycles through all towns If a town is in ruins, its remaining_ruin_time_hours counter is decreased If a counter hits 0, the town is deletedstatic intgetTimeSinceRuining(Town town) static booleanisPlayersTownRuined(@NotNull org.bukkit.entity.Player player) This method returns true if the given player's town is ruinedstatic voidprocessRuinedTownReclaimRequest(org.bukkit.entity.Player player) Processes a player request to reclaim a ruined townstatic voidputTownIntoRuinedState(Town town) Put town into ruined state: 1.static voidreclaimTown(@NotNull Resident resident, @NotNull Town town)
-
Method Details
-
isPlayersTownRuined
public static boolean isPlayersTownRuined(@NotNull @NotNull org.bukkit.entity.Player player) This method returns true if the given player's town is ruined- Parameters:
player- the player- Returns:
- true if ruined, false if not
-
putTownIntoRuinedState
Put town into ruined state: 1. Remove town from nation 2. Set mayor to NPC 3. Enable all perms 4. Now, the residents cannot run /plot commands, and some /t commands 5. Town will later be deleted full, unless it is reclaimed- Parameters:
town- The town to put into a "ruined" state.
-
processRuinedTownReclaimRequest
public static void processRuinedTownReclaimRequest(org.bukkit.entity.Player player) Processes a player request to reclaim a ruined town- Parameters:
player- The player reclaiming a ruined town.
-
reclaimTown
-
evaluateRuinedTownRemovals
public static void evaluateRuinedTownRemovals()This method cycles through all towns If a town is in ruins, its remaining_ruin_time_hours counter is decreased If a counter hits 0, the town is deleted -
getTimeSinceRuining
-
addRuinedComponents
-