Class TownRuinUtil

java.lang.Object
com.palmergames.bukkit.towny.utils.TownRuinUtil

public class TownRuinUtil extends Object
This class contains utility functions related to ruins
Author:
Goosius
  • 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

      public static void putTownIntoRuinedState(Town town)
      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

      public static void reclaimTown(@NotNull @NotNull Resident resident, @NotNull @NotNull Town town)
    • 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

      public static int getTimeSinceRuining(Town town)
    • addRuinedComponents

      public static void addRuinedComponents(Town town, StatusScreen screen, Translator translator)