Upload folder via GUI - src
This commit is contained in:
@@ -11,7 +11,8 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
@@ -21,13 +22,15 @@ import java.time.format.DateTimeFormatter;
|
||||
public class PlayerLoginLogger implements Listener {
|
||||
|
||||
private static final DateTimeFormatter FMT =
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss z");
|
||||
|
||||
private final Plugin plugin;
|
||||
private final File logFile;
|
||||
private final File logFile;
|
||||
private final ZoneId zoneId;
|
||||
|
||||
public PlayerLoginLogger(Plugin plugin) {
|
||||
public PlayerLoginLogger(Plugin plugin, ZoneId zoneId) {
|
||||
this.plugin = plugin;
|
||||
this.zoneId = zoneId;
|
||||
this.logFile = new File(plugin.getDataFolder(), "player-logins.log");
|
||||
|
||||
// Sicherstellen, dass das Plugin-Verzeichnis existiert
|
||||
@@ -53,7 +56,7 @@ public class PlayerLoginLogger implements Listener {
|
||||
plugin.getLogger().warning("[PlayerLoginLogger] Konnte IP nicht lesen: " + e.getMessage());
|
||||
}
|
||||
|
||||
String timestamp = LocalDateTime.now().format(FMT);
|
||||
String timestamp = ZonedDateTime.now(zoneId).format(FMT);
|
||||
String line = String.format("[%s] UUID=%s | Name=%-16s | IP=%s",
|
||||
timestamp, uuid, name, ip);
|
||||
|
||||
|
||||
@@ -154,9 +154,18 @@ public class StatusAPI extends Plugin implements Runnable {
|
||||
// PlayerLoginLogger: schreibt UUID, Name und IP bei jedem Join in player-logins.log
|
||||
// Aktivieren: LOGIN_LOGGER_ENABLED = true setzen und neu kompilieren
|
||||
if (LOGIN_LOGGER_ENABLED) {
|
||||
PlayerLoginLogger loginLogger = new PlayerLoginLogger(this);
|
||||
Properties loginProps = loadNetworkGuardProperties();
|
||||
String tzRaw = loginProps.getProperty("login.log.timezone", "UTC").trim();
|
||||
java.time.ZoneId loginZone;
|
||||
try {
|
||||
loginZone = java.time.ZoneId.of(tzRaw);
|
||||
} catch (java.time.zone.ZoneRulesException e) {
|
||||
getLogger().warning("[PlayerLoginLogger] Unbekannte Zeitzone '" + tzRaw + "' – fallback auf UTC.");
|
||||
loginZone = java.time.ZoneId.of("UTC");
|
||||
}
|
||||
PlayerLoginLogger loginLogger = new PlayerLoginLogger(this, loginZone);
|
||||
ProxyServer.getInstance().getPluginManager().registerListener(this, loginLogger);
|
||||
getLogger().info("[PlayerLoginLogger] Login-Logging aktiv -> " + getDataFolder() + "/player-logins.log");
|
||||
getLogger().info("[PlayerLoginLogger] Login-Logging aktiv -> " + getDataFolder() + "/player-logins.log (Zeitzone: " + loginZone + ")");
|
||||
}
|
||||
|
||||
// FIX: ScoreboardModule mit NetworkInfoModule verbinden (TPS-Fallback)
|
||||
|
||||
@@ -6,7 +6,7 @@ networkinfo.command.enabled=true
|
||||
# Aus Datenschutzgruenden standardmaessig aus. Wenn true, erscheinen alle Spielernamen im JSON.
|
||||
networkinfo.include_player_names=false
|
||||
|
||||
# Discord Webhook fuer Status-, Warn- und Attack-Meldungen
|
||||
# Discord Webhook für Status-, Warn- und Attack-Meldungen
|
||||
networkinfo.webhook.enabled=false
|
||||
networkinfo.webhook.url=
|
||||
networkinfo.webhook.username=
|
||||
@@ -31,6 +31,10 @@ networkinfo.attack.source=
|
||||
# API-Key fuer POST /network/attack
|
||||
networkinfo.attack.api_key=
|
||||
|
||||
# Zeitzone (IANA-Format, z.B. Europe/Berlin, UTC, America/New_York)
|
||||
# Vollstaendige Liste: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
login.log.timezone=Europe/Berlin
|
||||
|
||||
# ===========================
|
||||
# ANTIBOT / ATTACK GUARD
|
||||
# ===========================
|
||||
@@ -89,8 +93,8 @@ antibot.learning.recent_events.limit=30
|
||||
# ===========================
|
||||
# Diese Werte koennen von BackendJoinGuard im StatusAPI-Sync-Modus abgeholt werden.
|
||||
# Standalone bleibt weiterhin moeglich.
|
||||
backendguard.enforcement_enabled=true
|
||||
backendguard.log_blocked_attempts=true
|
||||
backendguard.enforcement_enabled=false
|
||||
backendguard.log_blocked_attempts=false
|
||||
backendguard.kick_message=&cBitte verbinde dich nur über den Proxy-Server.
|
||||
# Wichtig: Hier nur echte Proxy-IP(s) eintragen.
|
||||
backendguard.allowed_proxy_ips=127.0.0.1,::1,10.0.0.10
|
||||
@@ -105,13 +109,13 @@ backendguard.sync.api_key=
|
||||
# MULTI ACCOUNT GUARD
|
||||
# ===========================
|
||||
# Verhindert, dass ein Spieler mit zwei Accounts gleichzeitig online ist.
|
||||
multiaccountguard.enabled=true
|
||||
multiaccountguard.enabled=false
|
||||
|
||||
# IP-Check: Gleiche IP mit unterschiedlichem Namen -> blockieren
|
||||
multiaccountguard.check_ip=true
|
||||
multiaccountguard.check_ip=false
|
||||
|
||||
# UUID-Check: Gleiche UUID mit unterschiedlichem Namen -> blockieren (Bedrock-Edge-Cases)
|
||||
multiaccountguard.check_uuid=true
|
||||
multiaccountguard.check_uuid=false
|
||||
|
||||
# true = bestehenden (alten) Account rauswerfen, neuen reinlassen
|
||||
# false = neuen Account blockieren (Standard)
|
||||
@@ -121,15 +125,16 @@ multiaccountguard.kick_existing=false
|
||||
multiaccountguard.kick_message=&cDu bist bereits mit einem anderen Account online!\n&7Bitte trenne deinen anderen Account zuerst.
|
||||
|
||||
# Staff-Benachrichtigung bei Konflikt (Permission: statusapi.staff.notify)
|
||||
multiaccountguard.staff_notify.enabled=true
|
||||
multiaccountguard.staff_notify.enabled=false
|
||||
multiaccountguard.staff_notify.format=&8[&cMAG&8] &e{blocked} &7wurde blockiert &8(2. Account von &e{existing}&8) &7| IP: &f{ip}
|
||||
|
||||
# Temporaerer IP-Bann nach X Versuchen (Integration mit AntiBotModule)
|
||||
# max_attempts: Anzahl Konflikte bevor die IP gebannt wird
|
||||
# duration_secs: Bann-Dauer in Sekunden
|
||||
multiaccountguard.tempban.enabled=true
|
||||
multiaccountguard.tempban.enabled=false
|
||||
multiaccountguard.tempban.max_attempts=3
|
||||
multiaccountguard.tempban.duration_secs=300
|
||||
|
||||
# Discord-Meldung bei jedem Konflikt (nutzt networkinfo.webhook.url automatisch)
|
||||
multiaccountguard.webhook.enabled=true
|
||||
multiaccountguard.webhook.enabled=false
|
||||
|
||||
|
||||
@@ -211,9 +211,11 @@ commands:
|
||||
|
||||
permissions:
|
||||
# ── AfkModule ──────────────────────────────────────────────
|
||||
# KEIN default – Permission muss manuell vergeben werden!
|
||||
# lp user <Name> permission set statusapi.afk.bypass true
|
||||
statusapi.afk.bypass:
|
||||
description: Automatisches AFK nach Inaktivität umgehen
|
||||
default: op
|
||||
description: Automatisches AFK nach Inaktivität umgehen (nur manuell vergeben)
|
||||
default: false
|
||||
|
||||
# ── StatusAPI Core ────────────────────────────────────────
|
||||
statusapi.admin:
|
||||
|
||||
322
StatusAPI/src/main/resources/plugin.yml.bak
Normal file
322
StatusAPI/src/main/resources/plugin.yml.bak
Normal file
@@ -0,0 +1,322 @@
|
||||
name: StatusAPI
|
||||
main: net.viper.status.StatusAPI
|
||||
version: 4.1.4
|
||||
author: M_Viper
|
||||
description: StatusAPI für BungeeCord inkl. Update-Checker, Modul-System und ChatModule
|
||||
# Mindestanforderung: Minecraft 1.20 / BungeeCord mit PlayerChatEvent-Unterstützung
|
||||
|
||||
softdepend:
|
||||
- LuckPerms
|
||||
- Geyser-BungeeCord
|
||||
|
||||
commands:
|
||||
# ── AfkModule ──────────────────────────────────────────────
|
||||
afk:
|
||||
description: AFK-Modus ein- oder ausschalten
|
||||
usage: /afk
|
||||
|
||||
# ── HelpModule ────────────────────────────────────────────
|
||||
help:
|
||||
description: Zeigt alle verfügbaren Befehle (Admin-Befehle nur mit Berechtigung)
|
||||
usage: /<command> help
|
||||
# Hinweis: Der Befehlsname ist in verify.properties unter statusapi.help konfigurierbar
|
||||
# Beispiel: statusapi.help=vn → /vn help
|
||||
|
||||
# ── ScoreboardModule ──────────────────────────────────────
|
||||
scoreboard:
|
||||
description: Scoreboard ein-/ausblenden oder zwischen Player/Admin wechseln
|
||||
usage: /scoreboard [hide|show|player|admin]
|
||||
aliases: [sb, togglesb]
|
||||
|
||||
# ── StatusAPI Admin ───────────────────────────────────────
|
||||
statusapi:
|
||||
description: StatusAPI verwalten (Reload, Info)
|
||||
usage: /statusapi reload
|
||||
aliases: [sapi]
|
||||
permission: statusapi.admin
|
||||
|
||||
# /pay und /ecoadmin werden von NexEco (Spigot) verwaltet
|
||||
|
||||
# ── VanishModule ──────────────────────────────────────────
|
||||
vanish:
|
||||
description: Vanish ein-/ausschalten
|
||||
usage: /vanish [Spieler]
|
||||
aliases: [v]
|
||||
|
||||
vanishlist:
|
||||
description: Alle unsichtbaren Spieler anzeigen
|
||||
usage: /vanishlist
|
||||
aliases: [vlist]
|
||||
|
||||
# ── Verify Modul ──────────────────────────────────────────
|
||||
verify:
|
||||
description: Verifiziere dich mit einem Token
|
||||
usage: /verify <token>
|
||||
|
||||
# ── ForumBridge Modul ─────────────────────────────────────
|
||||
forumlink:
|
||||
description: Verknüpfe deinen Minecraft-Account mit dem Forum
|
||||
usage: /forumlink <token>
|
||||
aliases: [fl]
|
||||
|
||||
forum:
|
||||
description: Zeigt ausstehende Forum-Benachrichtigungen an
|
||||
usage: /forum
|
||||
|
||||
# ── NetworkInfo Modul ─────────────────────────────────────
|
||||
netinfo:
|
||||
description: Zeigt erweiterte Proxy- und Systeminfos an
|
||||
usage: /netinfo
|
||||
|
||||
antibot:
|
||||
description: Zeigt AntiBot-Status und Verwaltung
|
||||
usage: /antibot <status|clearblocks|unblock|profile|reload>
|
||||
|
||||
# ── AutoMessage Modul ─────────────────────────────────────
|
||||
automessage:
|
||||
description: AutoMessage Verwaltung
|
||||
usage: /automessage reload
|
||||
|
||||
# ── ChatModule – Kanal ────────────────────────────────────
|
||||
channel:
|
||||
description: Kanal wechseln oder Kanalliste anzeigen
|
||||
usage: /channel [kanalname]
|
||||
aliases: [ch, kanal]
|
||||
|
||||
# ── ChatModule – HelpOp ───────────────────────────────────
|
||||
helpop:
|
||||
description: Sende eine Hilfeanfrage an das Team
|
||||
usage: /helpop <Nachricht>
|
||||
|
||||
# ── ChatModule – Privat-Nachrichten ───────────────────────
|
||||
msg:
|
||||
description: Sende eine private Nachricht
|
||||
usage: /msg <Spieler> <Nachricht>
|
||||
aliases: [tell, w, whisper]
|
||||
|
||||
r:
|
||||
description: Antworte auf die letzte private Nachricht
|
||||
usage: /r <Nachricht>
|
||||
aliases: [reply, antwort]
|
||||
|
||||
# ── ChatModule – Blockieren ───────────────────────────────
|
||||
ignore:
|
||||
description: Spieler ignorieren
|
||||
usage: /ignore <Spieler>
|
||||
aliases: [block]
|
||||
|
||||
unignore:
|
||||
description: Spieler nicht mehr ignorieren
|
||||
usage: /unignore <Spieler>
|
||||
aliases: [unblock]
|
||||
|
||||
# ── ChatModule – Mute (Admin) ─────────────────────────────
|
||||
chatmute:
|
||||
description: Spieler im Chat stumm schalten
|
||||
usage: /chatmute <Spieler> [Minuten]
|
||||
aliases: [gmute]
|
||||
|
||||
chatunmute:
|
||||
description: Chat-Stummschaltung aufheben
|
||||
usage: /chatunmute <Spieler>
|
||||
aliases: [gunmute]
|
||||
|
||||
# ── ChatModule – Selbst-Mute ──────────────────────────────
|
||||
chataus:
|
||||
description: Eigenen Chat-Empfang ein-/ausschalten
|
||||
usage: /chataus
|
||||
aliases: [togglechat, chaton, chatoff]
|
||||
|
||||
# ── ChatModule – Broadcast ────────────────────────────────
|
||||
broadcast:
|
||||
description: Nachricht an alle Spieler senden
|
||||
usage: /broadcast <Nachricht>
|
||||
aliases: [bc, alert]
|
||||
|
||||
# ── ChatModule – Emoji ────────────────────────────────────
|
||||
emoji:
|
||||
description: Liste aller verfügbaren Emojis
|
||||
usage: /emoji
|
||||
aliases: [emojis]
|
||||
|
||||
# ── ChatModule – Social Spy ───────────────────────────────
|
||||
socialspy:
|
||||
description: Private Nachrichten mitlesen (Admin)
|
||||
usage: /socialspy
|
||||
aliases: [spy]
|
||||
|
||||
# ── ChatModule – Reload ───────────────────────────────────
|
||||
chatreload:
|
||||
description: Chat-Konfiguration neu laden
|
||||
usage: /chatreload
|
||||
|
||||
# ── ChatModule – Admin-Info ───────────────────────────────
|
||||
chatinfo:
|
||||
description: Chat-Informationen ueber einen Spieler anzeigen (Admin)
|
||||
usage: /chatinfo <Spieler>
|
||||
|
||||
# ── ChatModule – Chat-History ─────────────────────────────
|
||||
chathist:
|
||||
description: Chat-History aus dem Logfile anzeigen (Admin)
|
||||
usage: /chathist [Spieler] [Anzahl]
|
||||
|
||||
# ── ChatModule – Mentions ─────────────────────────────────
|
||||
mentions:
|
||||
description: Mention-Benachrichtigungen ein-/ausschalten
|
||||
usage: /mentions
|
||||
aliases: [mention]
|
||||
|
||||
# ── ChatModule – Plugin-Bypass ────────────────────────────
|
||||
chatbypass:
|
||||
description: ChatModule fuer naechste Eingabe ueberspringen (fuer Plugin-Dialoge wie CMI)
|
||||
usage: /chatbypass
|
||||
aliases: [cbp]
|
||||
|
||||
# ── ChatModule – Account-Verknuepfung ─────────────────────
|
||||
# FIX #4: Command-Namen stimmen jetzt mit der Code-Registrierung überein.
|
||||
# Im ChatModule wird "discordlink" mit Alias "dlink" registriert,
|
||||
# und "telegramlink" mit Alias "tlink".
|
||||
discordlink:
|
||||
description: Minecraft-Account mit Discord verknuepfen
|
||||
usage: /discordlink
|
||||
aliases: [dlink]
|
||||
|
||||
telegramlink:
|
||||
description: Minecraft-Account mit Telegram verknuepfen
|
||||
usage: /telegramlink
|
||||
aliases: [tlink]
|
||||
|
||||
unlink:
|
||||
description: Account-Verknuepfung aufheben
|
||||
usage: /unlink <discord|telegram|all>
|
||||
|
||||
# ── ChatModule – Report ───────────────────────────────────
|
||||
report:
|
||||
description: Spieler melden
|
||||
usage: /report <Spieler> <Grund>
|
||||
|
||||
reports:
|
||||
description: Offene Reports anzeigen (Admin)
|
||||
usage: /reports [all]
|
||||
|
||||
reportclose:
|
||||
description: Report schliessen (Admin)
|
||||
usage: /reportclose <ID>
|
||||
|
||||
# ── ServerSwitcherModule ──────────────────────────────────
|
||||
go:
|
||||
description: Schneller Serverwechsel ueber Chat-Menue oder direkt
|
||||
usage: /go [servername]
|
||||
aliases: [wechsel, switch]
|
||||
|
||||
permissions:
|
||||
# ── AfkModule ──────────────────────────────────────────────
|
||||
statusapi.afk.bypass:
|
||||
description: Automatisches AFK nach Inaktivität umgehen
|
||||
default: op
|
||||
|
||||
# ── StatusAPI Core ────────────────────────────────────────
|
||||
statusapi.admin:
|
||||
description: Zugang zu StatusAPI-Administrationsbefehlen (reload etc.)
|
||||
default: op
|
||||
|
||||
statusapi.update.notify:
|
||||
description: Erlaubt Update-Benachrichtigungen
|
||||
default: op
|
||||
|
||||
statusapi.netinfo:
|
||||
description: Zugriff auf /netinfo
|
||||
default: op
|
||||
|
||||
statusapi.antibot:
|
||||
description: Zugriff auf /antibot
|
||||
default: op
|
||||
|
||||
statusapi.automessage:
|
||||
description: Zugriff auf /automessage reload
|
||||
default: op
|
||||
|
||||
# ── MultiAccountGuard ─────────────────────────────────────
|
||||
# KEIN default – Permission muss manuell vergeben werden!
|
||||
# lp user <Name> permission set statusapi.multiaccountguard.bypass true
|
||||
statusapi.multiaccountguard.bypass:
|
||||
description: Erlaubt mehrere gleichzeitige Accounts (nur manuell vergeben)
|
||||
|
||||
statusapi.staff.notify:
|
||||
description: Empfaengt Ingame-Benachrichtigungen vom MultiAccountGuard
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Kanaele ──────────────────────────────────
|
||||
chat.channel.local:
|
||||
description: Zugang zum Local-Kanal
|
||||
default: true
|
||||
|
||||
chat.channel.trade:
|
||||
description: Zugang zum Trade-Kanal
|
||||
default: true
|
||||
|
||||
chat.channel.staff:
|
||||
description: Zugang zum Staff-Kanal
|
||||
default: false
|
||||
|
||||
# ── ChatModule – HelpOp ───────────────────────────────────
|
||||
chat.helpop.receive:
|
||||
description: HelpOp-Nachrichten empfangen
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Mute ─────────────────────────────────────
|
||||
chat.mute:
|
||||
description: Spieler muten / unmuten
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Broadcast ────────────────────────────────
|
||||
chat.broadcast:
|
||||
description: Broadcast-Nachrichten senden
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Social Spy ───────────────────────────────
|
||||
chat.socialspy:
|
||||
description: Private Nachrichten mitlesen
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Admin ────────────────────────────────────
|
||||
chat.admin.bypass:
|
||||
description: Admin-Bypass - Kann nicht geblockt/gemutet werden
|
||||
default: op
|
||||
|
||||
chat.admin.notify:
|
||||
description: Benachrichtigungen ueber Mutes und Blocks erhalten
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Report ───────────────────────────────────
|
||||
chat.report:
|
||||
description: Spieler reporten (/report)
|
||||
default: true
|
||||
|
||||
# ── ChatModule – Farben ───────────────────────────────────
|
||||
chat.color:
|
||||
description: Farbcodes (&a, &b, ...) im Chat nutzen
|
||||
default: false
|
||||
|
||||
chat.color.format:
|
||||
description: Formatierungen (&l, &o, &n, ...) im Chat nutzen
|
||||
default: false
|
||||
|
||||
# ── ChatModule – Filter ───────────────────────────────────
|
||||
chat.filter.bypass:
|
||||
description: Chat-Filter (Anti-Spam, Caps, Blacklist) umgehen
|
||||
default: false
|
||||
|
||||
# ── CommandBlocker ────────────────────────────────────────
|
||||
commandblocker.bypass:
|
||||
description: Command-Blocker umgehen
|
||||
default: op
|
||||
|
||||
commandblocker.admin:
|
||||
description: CommandBlocker verwalten (/cb)
|
||||
default: op
|
||||
|
||||
# ── ServerSwitcherModule ──────────────────────────────────
|
||||
serverswitcher.use:
|
||||
description: Zugriff auf /go (Schneller Serverwechsel)
|
||||
default: false
|
||||
Reference in New Issue
Block a user