v1.1.2: fix reload decay task, nofall blocks, config cleanup, sqrt removal
This commit is contained in:
@@ -44,6 +44,7 @@ public final class XeroAntiCheat extends JavaPlugin {
|
||||
private DatabaseManager databaseManager;
|
||||
|
||||
private boolean protocolLibLoaded = false;
|
||||
private org.bukkit.scheduler.BukkitTask decayTask;
|
||||
|
||||
// Staff alert toggles
|
||||
private final Map<UUID, Boolean> alertToggles = new ConcurrentHashMap<>();
|
||||
@@ -174,7 +175,7 @@ public final class XeroAntiCheat extends JavaPlugin {
|
||||
|
||||
private void startDecayTask() {
|
||||
int interval = configManager.getInt("violation.decay_interval", 30) * 20;
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
|
||||
decayTask = Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
|
||||
violationManager.decayAll();
|
||||
}, interval, interval);
|
||||
}
|
||||
@@ -233,6 +234,12 @@ public final class XeroAntiCheat extends JavaPlugin {
|
||||
violationManager.clearAll();
|
||||
violationManager.setDecayRate(
|
||||
configManager.getDouble("violation.decay_rate", 0.5));
|
||||
|
||||
if (decayTask != null) {
|
||||
decayTask.cancel();
|
||||
}
|
||||
startDecayTask();
|
||||
|
||||
getLogger().info("Configuration reloaded!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user