Class JailUtil

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

public class JailUtil extends Object
  • Constructor Details

    • JailUtil

      public JailUtil()
  • Method Details

    • jailResident

      @Deprecated(since="0.103.2.12") public static void jailResident(Resident resident, Jail jail, int cell, int hours, JailReason reason, org.bukkit.command.CommandSender jailer)
      Deprecated.
      Jailing no longer uses hours as a sentence duration, instead use jailResident(Resident, Jail, int, long, JailReason, CommandSender) supplying the seconds.
    • jailResident

      public static void jailResident(Resident resident, Jail jail, int cell, long seconds, JailReason reason, org.bukkit.command.CommandSender jailer)
      Jails a resident.
      Parameters:
      resident - Resident being jailed.
      jail - Jail resident is being jailed into.
      cell - JailCell to spawn to.
      seconds - Seconds resident is jailed for.
      reason - JailReason resident is jailed for.
      jailer - CommandSender of who did the jailing or null.
    • jailResidentWithBail

      @Deprecated(since="0.103.2.12") public static void jailResidentWithBail(Resident resident, Jail jail, int cell, int hours, double bail, JailReason reason, org.bukkit.command.CommandSender jailer)
      Deprecated.
      Jailing no longer uses hours as a sentence duration, instead use jailResidentWithBail(Resident, Jail, int, long, double, JailReason, CommandSender) supplying the seconds.
    • jailResidentWithBail

      public static void jailResidentWithBail(Resident resident, Jail jail, int cell, long seconds, double bail, JailReason reason, org.bukkit.command.CommandSender jailer)
      Jails a resident.
      Parameters:
      resident - Resident being jailed.
      jail - Jail resident is being jailed into.
      cell - JailCell to spawn to.
      seconds - Seconds resident is jailed for.
      bail - Bail amount to be paid to unjail.
      reason - JailReason resident is jailed for.
      jailer - CommandSender of who did the jailing or null.
    • showBailTitleMessage

      public static void showBailTitleMessage(Resident resident, Translator translator)
    • removePlayerBossBar

      public static void removePlayerBossBar(org.bukkit.entity.Player player)
    • unJailResident

      public static void unJailResident(Resident resident, UnJailReason reason)
      Unjails a resident.
      Parameters:
      resident - Resident being unjailed.
      reason - UnJailReason the resident is unjailed for.
    • unJailResident

      public static void unJailResident(Resident resident)
    • createJailPlot

      public static void createJailPlot(TownBlock townBlock, Town town, org.bukkit.Location location) throws TownyException
      Throws:
      TownyException
    • isQueuedToBeJailed

      public static boolean isQueuedToBeJailed(Resident resident)
    • maxJailedUnjail

      public static void maxJailedUnjail(Town town)
    • checkUnjailTimesAndIncurJailFees

      public static void checkUnjailTimesAndIncurJailFees()
      Check if a resident has served their sentence and remove hourly jail fee from town bank if possible