Update TempbanCMD.java

This commit is contained in:
Deauthorized 2024-05-02 17:28:34 -04:00 committed by GitHub
parent 647f17b5bd
commit 0c7b280aef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,12 +58,12 @@ public class TempbanCMD extends PlexCommand
{
reason = StringUtils.join(args, " ", 2, args.length);
String newReason = StringUtils.normalizeSpace(reason.replace("-nrb", ""));
punishment.setReason(newReason.trim().isEmpty() ? "No reason provided." : newReason);
punishment.setReason(newReason.trim().isEmpty() ? messageString("noReasonProvided") : newReason);
rollBack = !reason.startsWith("-nrb") && !reason.endsWith("-nrb");
}
else
{
punishment.setReason("No reason provided.");
punishment.setReason(messageString("noReasonProvided"));
}
punishment.setPunishedUsername(target.getName());
punishment.setEndDate(TimeUtils.createDate(args[1]));