This is supposed to be empty by default not null

This commit is contained in:
Taah 2023-08-24 15:36:49 -07:00
parent 72d9e0817c
commit 295e16b6c5

View File

@ -20,7 +20,7 @@ public class BanListener extends PlexListener
if (uuidBan != null)
{
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
uuidBan.getReason() != null ? Punishment.generateIndefBanMessageWithReason("UUID", uuidBan.getReason()) : Punishment.generateIndefBanMessage("UUID"));
uuidBan.getReason().isEmpty() ? Punishment.generateIndefBanMessageWithReason("UUID", uuidBan.getReason()) : Punishment.generateIndefBanMessage("UUID"));
return;
}
@ -28,7 +28,7 @@ public class BanListener extends PlexListener
if (ipBan != null)
{
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
ipBan.getReason() != null ? Punishment.generateIndefBanMessageWithReason("IP", ipBan.getReason()) : Punishment.generateIndefBanMessage("IP"));
ipBan.getReason().isEmpty() ? Punishment.generateIndefBanMessageWithReason("IP", ipBan.getReason()) : Punishment.generateIndefBanMessage("IP"));
return;
}
@ -37,7 +37,7 @@ public class BanListener extends PlexListener
if (userBan != null)
{
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
userBan.getReason() != null ? Punishment.generateIndefBanMessageWithReason("username", userBan.getReason()) : Punishment.generateIndefBanMessage("username"));
userBan.getReason().isEmpty() ? Punishment.generateIndefBanMessageWithReason("username", userBan.getReason()) : Punishment.generateIndefBanMessage("username"));
return;
}