From 8fdd590ebb2bdc18143a980cf05834186261606b Mon Sep 17 00:00:00 2001 From: LlmDl Date: Wed, 27 Nov 2024 16:18:05 -0600 Subject: [PATCH] Stop paybail messaging if the resident is offline. --- .../main/java/com/palmergames/bukkit/towny/utils/JailUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/utils/JailUtil.java b/Towny/src/main/java/com/palmergames/bukkit/towny/utils/JailUtil.java index 209f222110..00c559da7a 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/utils/JailUtil.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/utils/JailUtil.java @@ -137,7 +137,7 @@ public static void jailResidentWithBail(Resident resident, Jail jail, int cell, } public static void showBailTitleMessage(Resident resident, Translator translator) { - if (!resident.isJailed() || resident.getJailBailCost() <= 0) + if (!resident.isOnline() || !resident.isJailed() || resident.getJailBailCost() <= 0) return; TownyMessaging.sendTitleMessageToResident(resident, translator.of("titlemsg_pay_your_bail_title", TownyEconomyHandler.getFormattedBalance(resident.getJailBailCost())),