Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3f7afab4d | ||
|
|
a7bd93fd40 |
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>de.serverpulse</groupId>
|
||||
<artifactId>ServerPulse</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ServerPulse</name>
|
||||
|
||||
@@ -25,6 +25,10 @@ public class AlertManager {
|
||||
// Standard-Cooldown: 5 Minuten
|
||||
private static final long DEFAULT_COOLDOWN_MS = 5 * 60 * 1000;
|
||||
|
||||
// Startup-Grace-Period
|
||||
private final long pluginStartTimeMs = System.currentTimeMillis();
|
||||
private final long startupGracePeriodMs;
|
||||
|
||||
// Zähler für kritische Ereignisse (für Auto-Diagnose)
|
||||
private int criticalEventCount = 0;
|
||||
|
||||
@@ -33,6 +37,7 @@ public class AlertManager {
|
||||
|
||||
public AlertManager(ServerPulse plugin) {
|
||||
this.plugin = plugin;
|
||||
this.startupGracePeriodMs = plugin.getConfigManager().getStartupCheckDelayMinutes() * 60_000L;
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────
|
||||
@@ -44,6 +49,12 @@ public class AlertManager {
|
||||
*/
|
||||
public void triggerAlert(String alertType, AlertSeverity severity, String worldName,
|
||||
String message, Double currentValue, Double threshold) {
|
||||
// Startup-Grace-Period prüfen
|
||||
if (isStartupGracePeriodActive()) {
|
||||
plugin.debug("Startup-Delay aktiv: Alert unterdrückt (" + alertType + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
// Cooldown prüfen
|
||||
String cooldownKey = alertType + (worldName != null ? "_" + worldName : "");
|
||||
long now = System.currentTimeMillis();
|
||||
@@ -211,4 +222,8 @@ public class AlertManager {
|
||||
public int getCriticalEventCount() {
|
||||
return criticalEventCount;
|
||||
}
|
||||
|
||||
private boolean isStartupGracePeriodActive() {
|
||||
return System.currentTimeMillis() - pluginStartTimeMs < startupGracePeriodMs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,10 @@ public class ConfigManager {
|
||||
return config.getInt("general.data-retention-days", 90);
|
||||
}
|
||||
|
||||
public int getStartupCheckDelayMinutes() {
|
||||
return Math.max(0, config.getInt("general.startup-check-delay-minutes", 5));
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────
|
||||
// DATENBANK
|
||||
// ──────────────────────────────────────────
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: ServerPulse
|
||||
version: '1.0.0'
|
||||
version: '1.0.1'
|
||||
main: de.serverpulse.bungee.BungeePlugin
|
||||
author: ServerPulse-Team
|
||||
description: ServerPulse BungeeCord Module (unified JAR)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ╔══════════════════════════════════════════╗
|
||||
# ║ ServerPulse v1.0.0 Configuration ║
|
||||
# ║ ServerPulse v1.0.1 Configuration ║
|
||||
# ║ Unified JAR – Spigot / Paper / Bungee ║
|
||||
# ╚══════════════════════════════════════════╝
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: ServerPulse
|
||||
version: '1.0.0'
|
||||
version: '1.0.1'
|
||||
main: de.serverpulse.spigot.SpigotPlugin
|
||||
api-version: '1.21'
|
||||
description: Monitoring & Analytics Suite (Spigot/Paper/BungeeCord unified)
|
||||
|
||||
Reference in New Issue
Block a user