Skip to content

Commit

Permalink
Stop paybail messaging if the resident is offline.
Browse files Browse the repository at this point in the history
  • Loading branch information
LlmDl committed Nov 27, 2024
1 parent 9c0f911 commit 8fdd590
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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())),
Expand Down

0 comments on commit 8fdd590

Please sign in to comment.