mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
turns out you need this 💀
This commit is contained in:
parent
22a26edd79
commit
cd0da8d78e
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user