turns out you need this 💀

This commit is contained in:
Telesphoreo 2022-03-03 15:43:28 -06:00
parent 22a26edd79
commit cd0da8d78e
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package dev.plex.services;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import dev.plex.Plex; import dev.plex.Plex;
import dev.plex.services.impl.BanService;
import dev.plex.services.impl.GameRuleService; import dev.plex.services.impl.GameRuleService;
import java.util.List; import java.util.List;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -12,6 +13,7 @@ public class ServiceManager
public ServiceManager() public ServiceManager()
{ {
registerService(new BanService());
registerService(new GameRuleService()); registerService(new GameRuleService());
} }

View File

@ -22,8 +22,6 @@ public class BanService extends AbstractService
if (LocalDateTime.now().isAfter(punishment.getEndDate())) if (LocalDateTime.now().isAfter(punishment.getEndDate()))
{ {
Plex.get().getPunishmentManager().unban(punishment); 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())); Bukkit.broadcast(Component.text("Plex - Unbanned " + Bukkit.getOfflinePlayer(punishment.getPunished()).getName()));
} }
} }
@ -32,6 +30,7 @@ public class BanService extends AbstractService
@Override @Override
public int repeatInSeconds() public int repeatInSeconds()
{ {
return 1; // Every 5 minutes
return 300;
} }
} }