fix /notes
fix /rank
switch /admin to a datautils check instead of using ashcon api
This commit is contained in:
Taah
2022-04-10 15:02:50 -07:00
parent 81d3cc8dde
commit 8dfaaf7a8c
13 changed files with 88 additions and 39 deletions

View File

@ -159,10 +159,14 @@ public class PunishmentManager extends PlexBase
}
else
{
PlexLog.debug("Checking active bans mysql");
CompletableFuture<List<Punishment>> future = new CompletableFuture<>();
Plex.get().getSqlPunishment().getPunishments().whenComplete((punishments, throwable) ->
{
future.complete(punishments.stream().filter(Punishment::isActive).filter(punishment -> punishment.getType() == PunishmentType.BAN).toList());
PlexLog.debug("Received Punishments");
List<Punishment> punishmentList = punishments.stream().filter(Punishment::isActive).filter(punishment -> punishment.getType() == PunishmentType.BAN).toList();
PlexLog.debug("Completing with {0} punishments", punishmentList.size());
future.complete(punishmentList);
});
return future;
}