From cd0da8d78e3ba90e788149dd911b574deddef299 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Thu, 3 Mar 2022 15:43:28 -0600 Subject: [PATCH] turns out you need this :skull: --- src/main/java/dev/plex/services/ServiceManager.java | 2 ++ src/main/java/dev/plex/services/impl/BanService.java | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/plex/services/ServiceManager.java b/src/main/java/dev/plex/services/ServiceManager.java index d775025..90e0934 100644 --- a/src/main/java/dev/plex/services/ServiceManager.java +++ b/src/main/java/dev/plex/services/ServiceManager.java @@ -2,6 +2,7 @@ package dev.plex.services; import com.google.common.collect.Lists; import dev.plex.Plex; +import dev.plex.services.impl.BanService; import dev.plex.services.impl.GameRuleService; import java.util.List; import org.bukkit.Bukkit; @@ -12,6 +13,7 @@ public class ServiceManager public ServiceManager() { + registerService(new BanService()); registerService(new GameRuleService()); } diff --git a/src/main/java/dev/plex/services/impl/BanService.java b/src/main/java/dev/plex/services/impl/BanService.java index 3b76753..8af43c2 100644 --- a/src/main/java/dev/plex/services/impl/BanService.java +++ b/src/main/java/dev/plex/services/impl/BanService.java @@ -22,8 +22,6 @@ public class BanService extends AbstractService if (LocalDateTime.now().isAfter(punishment.getEndDate())) { Plex.get().getPunishmentManager().unban(punishment); -// Plex.get().getBanManager().unban(ban.getId()); -// Bukkit.broadcastMessage("Plex - Unbanned " + Bukkit.getOfflinePlayer(ban.getUuid()).getName()); Bukkit.broadcast(Component.text("Plex - Unbanned " + Bukkit.getOfflinePlayer(punishment.getPunished()).getName())); } } @@ -32,6 +30,7 @@ public class BanService extends AbstractService @Override public int repeatInSeconds() { - return 1; + // Every 5 minutes + return 300; } }