Class JailUtil
java.lang.Object
com.palmergames.bukkit.towny.utils.JailUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCheck if a resident has served their sentence and remove hourly jail fee from town bank if possiblestatic voidcreateJailPlot(TownBlock townBlock, Town town, org.bukkit.Location location) static booleanisQueuedToBeJailed(Resident resident) static voidjailResident(Resident resident, Jail jail, int cell, int hours, JailReason reason, org.bukkit.command.CommandSender jailer) Deprecated.static voidjailResident(Resident resident, Jail jail, int cell, long seconds, JailReason reason, org.bukkit.command.CommandSender jailer) Jails a resident.static voidjailResidentWithBail(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 usejailResidentWithBail(Resident, Jail, int, long, double, JailReason, CommandSender)supplying the seconds.static voidjailResidentWithBail(Resident resident, Jail jail, int cell, long seconds, double bail, JailReason reason, org.bukkit.command.CommandSender jailer) Jails a resident.static voidmaxJailedUnjail(Town town) static voidremovePlayerBossBar(org.bukkit.entity.Player player) static voidshowBailTitleMessage(Resident resident, Translator translator) static voidunJailResident(Resident resident) static voidunJailResident(Resident resident, UnJailReason reason) Unjails a resident.
-
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 usejailResident(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 usejailResidentWithBail(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
-
removePlayerBossBar
public static void removePlayerBossBar(org.bukkit.entity.Player player) -
unJailResident
Unjails a resident.- Parameters:
resident- Resident being unjailed.reason- UnJailReason the resident is unjailed for.
-
unJailResident
-
createJailPlot
public static void createJailPlot(TownBlock townBlock, Town town, org.bukkit.Location location) throws TownyException - Throws:
TownyException
-
isQueuedToBeJailed
-
maxJailedUnjail
-
checkUnjailTimesAndIncurJailFees
public static void checkUnjailTimesAndIncurJailFees()Check if a resident has served their sentence and remove hourly jail fee from town bank if possible
-
jailResident(Resident, Jail, int, long, JailReason, CommandSender)supplying the seconds.