Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c1b980388 | |||
| 983ca72aaa | |||
| eed33a4bd7 | |||
| 0ede50287f | |||
| 6b0d6fa460 | |||
| d219278689 | |||
| 1bea420d24 | |||
| 42cd51aa35 | |||
| ef27111cad | |||
| cac8d9287d | |||
| 4bb1086534 | |||
| e8db790b74 | |||
| fe48d0e9f3 | |||
| 2bf1c72971 |
335
README.md
335
README.md
@@ -4,15 +4,16 @@
|
||||
<img src="https://m-viper.de/img/NexusLobby.png" width="500" alt="NexusLobby">
|
||||
</p>
|
||||
|
||||
Ein umfassendes Lobby-Plugin für Minecraft Server (Paper/Spigot 1.21+) mit modularem Aufbau, High-End NPC-System, umfangreichen Sicherheitsfunktionen und voller Konfigurierbarkeit.
|
||||
Ein umfassendes, modulares Lobby-Plugin für Minecraft Server (Paper/Spigot 1.21+) mit High-End NPC-System, umfangreichen Sicherheitsfunktionen, Soccer-Modul, Parkour-System und voller Konfigurierbarkeit.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Lizenz und Nutzungsbedingungen
|
||||
## 🎯 Lizenz und Nutzungsbedingungen
|
||||
|
||||
**ALLE RECHTE VORBEHALTEN**
|
||||
|
||||
@@ -28,68 +29,245 @@ Bei Verstoß gegen diese Bedingungen behalten wir uns rechtliche Schritte vor.
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
## ✨ Features
|
||||
|
||||
### 🤖 High-End NPC & ArmorStand System
|
||||
- **Conversation Manager** - Komplexe Dialoge zwischen NPCs mit Sprechblasen und Sound-Effekten.
|
||||
- **Dynamic KI** - NPCs reagieren auf Tageszeit (Fackel nachts) und ziehen bei Annäherung von Spielern das Schwert.
|
||||
- **LookAt-Logik** - NPCs verfolgen flüssig die Kopfbewegungen von Spielern in der Nähe.
|
||||
- **Command Binding** - Binde Spieler-, Konsolen- oder Bungee-Befehle an NPC-Slots (0-9).
|
||||
- **Status-Backup** - Automatisches Speichern von NPC-Namen via PersistentDataContainer & Tags.
|
||||
- **Conversation Manager** - Komplexe Dialoge zwischen NPCs mit Sprechblasen und Sound-Effekten
|
||||
- **Dynamic KI** - NPCs reagieren auf Tageszeit (Fackel nachts) und ziehen bei Annäherung von Spielern das Schwert
|
||||
- **LookAt-Logik** - NPCs verfolgen flüssig die Kopfbewegungen von Spielern in der Nähe
|
||||
- **Command Binding** - Binde Spieler-, Konsolen- oder Bungee-Befehle an NPC-Slots (0-9)
|
||||
- **Status-Backup** - Automatisches Speichern von NPC-Namen via PersistentDataContainer & Tags
|
||||
|
||||
### ⚽ Soccer/Fußball-System
|
||||
- **Interaktiver Soccer-Ball** - Physics-basierter Ball mit realistischer Physik
|
||||
- **Dribbling** - Ball folgt Spielern automatisch in der Nähe
|
||||
- **Kick-Mechanik** - Schieße den Ball durch Schlagen oder Angriff
|
||||
- **Wall-Bounce** - Realistische Wand-Abpraller mit Sound-Effekten
|
||||
- **Partikel-System** - Geschwindigkeits-abhängige Partikel (SONIC_BOOM, CRIT, SMOKE)
|
||||
- **Auto-Respawn** - Automatischer Respawn bei Inaktivität oder Void-Fall
|
||||
- **Anti-Duplikat-System** - Verhindert mehrfache Ball-Instanzen
|
||||
|
||||
### 🏃 Parkour-System
|
||||
- **Unsichtbare Checkpoints** - Partikel-basierte Checkpoint-Markierungen
|
||||
- **Timer-System** - Präzise Zeitmessung mit ActionBar-Anzeige
|
||||
- **Bestenliste** - Persistente Top-10 Bestzeiten-Speicherung
|
||||
- **NPC-Trainer** - Interaktive NPCs zum Starten des Parkours
|
||||
- **Fail-Safe** - Teleport zum letzten Checkpoint bei Fehler
|
||||
|
||||
### 🌍 Lobby-Management
|
||||
- **Spawn-System** - Automatischer Teleport zum Spawn bei Join/Respawn.
|
||||
- **Portal-System** - BungeeCord-Portale für nahtlose Server-Wechsel.
|
||||
- **Build-Modus** - Schnelles Umschalten zwischen Bau- und Spielmodus.
|
||||
- **Double-Jump** - Konfigurierbarer Doppelsprung mit Cooldown und Partikeln.
|
||||
- **Spawn-System** - Automatischer Teleport zum Spawn bei Join/Respawn
|
||||
- **Portal-System** - BungeeCord-Portale für nahtlose Server-Wechsel mit Partikel-Effekten
|
||||
- **Build-Modus** - Schnelles Umschalten zwischen Bau- und Spielmodus
|
||||
- **Double-Jump** - Konfigurierbarer Doppelsprung mit Cooldown und Partikeln
|
||||
- **Worldborder** - Unsichtbare Lobby-Begrenzung (Circle/Square)
|
||||
- **Intro-Tour** - Cinematic Kamera-Tour für neue Spieler
|
||||
|
||||
### 🛡️ Sicherheit & Protection
|
||||
- **VPN-Blocker** - Blockiert VPN/Proxy-Verbindungen via proxycheck.io API.
|
||||
- **Country-Blocker** - Geo-IP Filter (Whitelist/Blacklist für Länder).
|
||||
- **Maintenance** - Vollständiger Wartungsmodus mit Whitelist-Funktion.
|
||||
- **World-Protection** - Schutz vor Griefing, Hunger, Fallschaden und PvP.
|
||||
- **VPN-Blocker** - Blockiert VPN/Proxy-Verbindungen via proxycheck.io API
|
||||
- **Country-Blocker** - Geo-IP Filter (Whitelist/Blacklist für Länder)
|
||||
- **Maintenance-Modus** - Vollständiger Wartungsmodus mit Whitelist-Funktion
|
||||
- **World-Protection** - Schutz vor Griefing, Hunger, Fallschaden und PvP
|
||||
- **Anti-Grief** - Verhindert Block-Break, Item-Drop und Explosionen
|
||||
- **Security-Module** - Umfassende Sicherheitsprüfungen beim Join
|
||||
|
||||
### 📊 Visuelle Elemente
|
||||
- **Scoreboard & Tablist** - Vollständig animiert mit PlaceholderAPI-Support.
|
||||
- **BossBar & ActionBar** - Rotierende Nachrichten und permanente Status-Anzeigen.
|
||||
- **Hologramme** - Einfache Erstellung von Text-Displays in der Lobby.
|
||||
- **Scoreboard** - Vollständig animiert mit PlaceholderAPI-Support
|
||||
- **Tablist** - Dynamische Header/Footer mit Permissions-Anzeige
|
||||
- **BossBar** - Rotierende Nachrichten mit Farb-Effekten
|
||||
- **ActionBar** - Typewriter-Effekt für permanente Status-Anzeigen
|
||||
- **Hologramme** - Text-Displays mit flexibler Positionierung
|
||||
- **MapArt** - Bild-Generator für Item-Frames aus URLs
|
||||
|
||||
### 🎮 Item-System
|
||||
- **Compass** - Server-Switcher GUI
|
||||
- **Player-Hider** - Sichtbarkeits-Toggle für andere Spieler
|
||||
- **Gadgets** - Konfigurierbares Item-System mit Custom-Slots
|
||||
- **Player-Inspector** - Detaillierte Spieler-Informationen per Click
|
||||
|
||||
---
|
||||
|
||||
## Befehle
|
||||
## 📋 Befehle
|
||||
|
||||
### Haupt-Commands
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/nexuslobby` | Hauptbefehl (reload, setspawn, silentjoin) | `nexuslobby.admin` |
|
||||
| `/nexuscmd` | NPC Command/Dialog Verwaltung (aliases: `ncmd`, `conv`) | `nexuslobby.armorstand.cmd` |
|
||||
| `/nexustools` | NPC Editor GUI (Rotation, KI, Sichtbarkeit) | `nexuslobby.armorstand.use` |
|
||||
| `/build` | Aktiviert/Deaktiviert den Baumodus | `nexuslobby.build` |
|
||||
| `/maintenance` | Schaltet den Wartungsmodus (on/off) | `nexuslobby.maintenance` |
|
||||
| `/portal` | Verwaltung der Server-Portale | `nexuslobby.portal` |
|
||||
| `/holo` | Erstellt oder löscht Text-Hologramme | `nexuslobby.hologram` |
|
||||
| `/mapart` | Erstellt Bilder aus URLs auf Karten-Rahmen | `nexuslobby.mapart` |
|
||||
| `/nexuslobby reload` | Lädt das Plugin neu | `nexuslobby.admin` |
|
||||
| `/nexuslobby setspawn` | Setzt den Lobby-Spawn | `nexuslobby.admin` |
|
||||
| `/nexuslobby silentjoin <on\|off>` | Versteckter Join/Quit | `nexuslobby.admin` |
|
||||
| `/nexuslobby sb <on\|off\|admin\|spieler>` | Scoreboard-Kontrolle | `nexuslobby.admin` |
|
||||
| `/spawn` | Teleport zum Spawn | `nexuslobby.spawn` |
|
||||
|
||||
### NPC & ArmorStand
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/nexustools` | NPC Editor GUI (Rotation, KI) | `nexuslobby.armorstand.use` |
|
||||
| `/nexuscmd add <slot> <prio> <type> [cmd]` | Bindet Command an NPC | `nexuslobby.armorstand.cmd` |
|
||||
| `/nexuscmd remove <slot\|all>` | Entfernt Commands | `nexuslobby.armorstand.cmd` |
|
||||
| `/nexuscmd conv select1-4` | Wählt NPCs für Dialog | `nexuslobby.armorstand.cmd` |
|
||||
| `/nexuscmd conv link <id>` | Verknüpft Dialog | `nexuslobby.armorstand.cmd` |
|
||||
| `/nexuscmd say <text>` | NPC-Sprechblase | `nexuslobby.armorstand.cmd` |
|
||||
|
||||
### Parkour
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/nexuslobby parkour setstart` | Markiert Start-NPC | `nexuslobby.admin` |
|
||||
| `/nexuslobby parkour setcheckpoint <n>` | Setzt Checkpoint | `nexuslobby.admin` |
|
||||
| `/nexuslobby parkour setfinish` | Setzt Ziel | `nexuslobby.admin` |
|
||||
| `/nexuslobby parkour reset` | Löscht eigene Zeit | `nexuslobby.admin` |
|
||||
| `/nexuslobby parkour clear` | Löscht alle Zeiten | `nexuslobby.admin` |
|
||||
| `/setstart` | Alias für setstart | `nexuslobby.admin` |
|
||||
| `/setcheckpoint` | Alias für setcheckpoint | `nexuslobby.admin` |
|
||||
| `/setfinish` | Alias für setfinish | `nexuslobby.admin` |
|
||||
|
||||
### Soccer/Fußball
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/nexuslobby ball setspawn` | Setzt Ball-Spawn | `nexuslobby.admin` |
|
||||
| `/nexuslobby ball respawn` | Spawnt Ball neu | `nexuslobby.admin` |
|
||||
| `/nexuslobby ball remove` | Entfernt Ball | `nexuslobby.admin` |
|
||||
|
||||
### Portal & Server
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/portal create <name> <type>` | Erstellt Portal | `nexuslobby.portal` |
|
||||
| `/portal delete <name>` | Löscht Portal | `nexuslobby.portal` |
|
||||
| `/portal list` | Zeigt alle Portale | `nexuslobby.portal` |
|
||||
| `/giveportalwand` | Portal-Werkzeug | `nexuslobby.portal.give` |
|
||||
| `/serverswitcher` | Öffnet Server-GUI | `nexuslobby.serverswitcher` |
|
||||
|
||||
### Sonstiges
|
||||
|
||||
| Befehl | Beschreibung | Berechtigung |
|
||||
|--------|--------------|--------------|
|
||||
| `/build` | Build-Modus toggle | `nexuslobby.build` |
|
||||
| `/maintenance <on\|off>` | Wartungsmodus | `nexuslobby.maintenance` |
|
||||
| `/settings` | Lobby-Einstellungen (Gamerules) | `nexuslobby.admin` |
|
||||
| `/holo create <id> [text]` | Erstellt Hologramm | `nexuslobby.hologram` |
|
||||
| `/holo delete <id>` | Löscht Hologramm | `nexuslobby.hologram` |
|
||||
| `/mapart <URL> <BxH>` | Erstellt MapArt | `nexuslobby.mapart` |
|
||||
| `/intro <add\|clear\|start>` | Intro-Tour-Verwaltung | `nexuslobby.admin` |
|
||||
| `/border <circle\|square\|disable>` | Worldborder-Setup | `nexuslobby.admin` |
|
||||
|
||||
---
|
||||
|
||||
## Konfiguration (Auszug)
|
||||
## ⚙️ Konfiguration
|
||||
|
||||
### config.yml (Auszug)
|
||||
|
||||
```yaml
|
||||
# Spawn-Einstellungen
|
||||
spawn:
|
||||
world: "world"
|
||||
x: 0.5
|
||||
y: 64.0
|
||||
z: 0.5
|
||||
yaw: 0.0
|
||||
pitch: 0.0
|
||||
|
||||
# Lobby-Einstellungen
|
||||
lobby:
|
||||
allow-fly: false
|
||||
pvp-enabled: false
|
||||
build-enabled: false
|
||||
default-gamemode: Adventure
|
||||
clear-inventory-on-join: true
|
||||
|
||||
# Server-Mapping (für Status-Check)
|
||||
servers:
|
||||
survival:
|
||||
ip: "127.0.0.1"
|
||||
port: 25566
|
||||
skyblock:
|
||||
ip: "127.0.0.1"
|
||||
port: 25567
|
||||
|
||||
# Ball/Soccer-Einstellungen
|
||||
ball:
|
||||
respawn_delay: 60 # Sekunden bis Auto-Respawn
|
||||
|
||||
# Worldborder
|
||||
worldborder:
|
||||
enabled: true
|
||||
type: "SQUARE" # SQUARE oder CIRCLE
|
||||
radius: 50.0
|
||||
```
|
||||
|
||||
### conversations.yml
|
||||
|
||||
```yaml
|
||||
conversations:
|
||||
willkommen:
|
||||
dialogue:
|
||||
- "&eWächter: &7Willkommen auf dem Server!"
|
||||
- "&aBürger: &7Schön, dass du da bist!"
|
||||
- "&eWächter: &7Viel Spaß beim Erkunden!"
|
||||
|
||||
quest_dialog:
|
||||
dialogue:
|
||||
- "&6Quest-Geber: &7Hast du meine Quest erledigt?"
|
||||
- "&aHeld: &7Ja, ich habe alle Monster besiegt!"
|
||||
|
||||
links:
|
||||
UUID-NPC1:
|
||||
partner: UUID-NPC2
|
||||
# UUID des ersten NPCs
|
||||
"550e8400-e29b-41d4-a716-446655440000":
|
||||
partner: "550e8400-e29b-41d4-a716-446655440001" # UUID des zweiten NPCs
|
||||
dialog: willkommen
|
||||
automated: true # Startet automatisch
|
||||
```
|
||||
|
||||
### visuals.yml (Auszug)
|
||||
|
||||
```yaml
|
||||
# ActionBar-Nachrichten
|
||||
actionbar:
|
||||
enabled: true
|
||||
speed: 3
|
||||
messages:
|
||||
- "&6&lWillkommen &8» &eauf unserem Server!"
|
||||
- "&b&lViel Spaß &8» &7in der Lobby!"
|
||||
|
||||
# BossBar
|
||||
bossbar:
|
||||
enabled: true
|
||||
interval: 40
|
||||
messages:
|
||||
- text: "&6&lNexusLobby &8» &eVersion 1.1.0"
|
||||
color: "YELLOW"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Berechtigungen
|
||||
## 🌐 Mehrsprachigkeit & Texte
|
||||
|
||||
Alle Nachrichten, Hilfetexte und Fehler werden zentral über die Datei `lang.yml` im Ordner `src/main/resources` verwaltet. Dort kannst du für jede Sprache (z.B. Deutsch und Englisch) die Texte pflegen und beliebig erweitern.
|
||||
|
||||
**Beispiel für lang.yml:**
|
||||
|
||||
```yaml
|
||||
welcome:
|
||||
de: "Willkommen auf dem Server!"
|
||||
en: "Welcome to the server!"
|
||||
no_permission:
|
||||
de: "§cKeine Berechtigung."
|
||||
en: "§cNo permission."
|
||||
```
|
||||
|
||||
**Sprache umstellen:**
|
||||
Im Code kann die Sprache mit `LangManager.setLanguage("en")` gewechselt werden. Standard ist Deutsch (`de`).
|
||||
|
||||
**Texte ingame nutzen:**
|
||||
Alle Texte werden im Plugin mit `LangManager.get("key")` abgerufen und sind direkt ingame sichtbar. Änderungen in der lang.yml wirken nach einem Reload sofort.
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Berechtigungen
|
||||
|
||||
### Admin-Berechtigungen
|
||||
|
||||
| Berechtigung | Beschreibung |
|
||||
|--------------|--------------|
|
||||
@@ -98,6 +276,18 @@ links:
|
||||
| `nexuslobby.armorstand.use` | Zugriff auf die ArmorStand-Editor GUI |
|
||||
| `nexuslobby.build` | Berechtigung für den Baumodus |
|
||||
| `nexuslobby.portal` | Portale erstellen und löschen |
|
||||
| `nexuslobby.portal.give` | Portal-Werkzeug erhalten |
|
||||
| `nexuslobby.hologram` | Hologramme verwalten |
|
||||
| `nexuslobby.mapart` | MapArt erstellen |
|
||||
| `nexuslobby.maintenance` | Wartungsmodus togglen |
|
||||
|
||||
### Spieler-Berechtigungen
|
||||
|
||||
| Berechtigung | Beschreibung |
|
||||
|--------------|--------------|
|
||||
| `nexuslobby.spawn` | Spawn-Command nutzen |
|
||||
| `nexuslobby.serverswitcher` | Server-Switcher GUI öffnen |
|
||||
| `nexuslobby.scoreboard.admin` | Admin-Scoreboard sehen |
|
||||
|
||||
### Bypass-Berechtigungen
|
||||
|
||||
@@ -105,16 +295,89 @@ links:
|
||||
|--------------|--------------|
|
||||
| `nexuslobby.bypass.maintenance` | Server trotz Wartungsmodus betreten |
|
||||
| `nexuslobby.bypass.vpn` | VPN-Check überspringen |
|
||||
| `nexuslobby.bypass.country` | Country-Check überspringen |
|
||||
|
||||
---
|
||||
|
||||
## Support & Kontakt
|
||||
## 🔧 Technische Details
|
||||
|
||||
- **Wiki:** Ausführliche Dokumentation der Module im [Wiki](../../../wiki).
|
||||
- **Bug-Reports:** Erstelle ein [Issue](../../../issues) bei technischen Problemen.
|
||||
### Systemanforderungen
|
||||
- **Minecraft**: Paper/Spigot 1.21+ (Spigot-kompatibel, Paper empfohlen)
|
||||
- **Java**: Java 21 oder höher
|
||||
- **Dependencies**: LuckPerms, PlaceholderAPI (optional)
|
||||
|
||||
### Verwendete Technologien
|
||||
- **Build-Tool**: Maven 3.9+
|
||||
- **JSON-Library**: Gson 2.10.1 (gegenüber json-simple 1.1.1 aktualisiert)
|
||||
- **BungeeCord API**: Für Server-Wechsel und Messaging
|
||||
- **PlaceholderAPI**: Für dynamische Platzhalter
|
||||
|
||||
### Code-Qualität
|
||||
- ✅ Moderne Java 21 Features (Switch-Expressions, Pattern Matching)
|
||||
- ✅ Proper Error-Handling (Logger statt printStackTrace)
|
||||
- ✅ Memory-Management (Tasks & Listeners werden sauber disposed)
|
||||
- ✅ Config-Validierung mit Default-Werten
|
||||
- ✅ Optimiertes JSON-Parsing mit Gson
|
||||
- ✅ Spigot-kompatible BungeeCord Chat API
|
||||
|
||||
### Performance-Optimierungen
|
||||
- **Async-Processing** für API-Calls (Update-Check, VPN-Check)
|
||||
- **Caching** für Spieler-Daten und Config-Werte
|
||||
- **Optimierte Entity-Queries** (nur relevante Welten)
|
||||
- **Effiziente Scheduler-Nutzung** (Tasks werden gecancelt)
|
||||
|
||||
---
|
||||
|
||||
**Copyright (c) 2026 - M_Viper - Alle Rechte vorbehalten**
|
||||
## 📦 Installation
|
||||
|
||||
1. **Download** der neuesten `NexusLobby-1.1.0.jar` aus den [Releases](../../releases)
|
||||
2. **Upload** der JAR-Datei in den `/plugins/` Ordner
|
||||
3. **Server-Neustart** durchführen
|
||||
4. **Konfiguration** anpassen (`config.yml`, `visuals.yml`, etc.)
|
||||
5. **Permissions** mit LuckPerms oder einem anderen Permissions-Plugin setzen
|
||||
6. **(Optional)** PlaceholderAPI installieren für erweiterte Platzhalter
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Bekannte Issues & Lösungen
|
||||
|
||||
### Ball spawnt mehrfach
|
||||
- **Lösung**: Nutze `/nexuslobby ball remove` gefolgt von `/nexuslobby ball setspawn`
|
||||
- Das Anti-Duplikat-System sollte dies automatisch verhindern
|
||||
|
||||
### NPCs schauen nicht zu Spielern
|
||||
- **Lösung**: Stelle sicher, dass der NPC mit `/nexustools` das LookAt-Feature aktiviert hat
|
||||
- Prüfe, ob `ArmorStandLookAtModule` in den Logs geladen wird
|
||||
|
||||
### Server-Checker zeigt falsche Status
|
||||
- **Lösung**: Überprüfe die IP/Port-Einstellungen in `config.yml` unter `servers:`
|
||||
- Stelle sicher, dass die Server erreichbar sind (Firewall, Ports)
|
||||
|
||||
---
|
||||
|
||||
## 📚 Support & Dokumentation
|
||||
|
||||
- **Wiki**: Ausführliche Dokumentation im [Wiki](../../wiki)
|
||||
- **Bug-Reports**: Erstelle ein [Issue](../../issues) bei technischen Problemen
|
||||
- **Feature-Requests**: Vorschläge über [Issues](../../issues) mit Label "enhancement"
|
||||
|
||||
---
|
||||
|
||||
## 📝 Changelog
|
||||
|
||||
### Version 1.1.0 (Februar 2026)
|
||||
- ✨ Soccer/Fußball-System mit realistischer Physik
|
||||
- ✨ Parkour-System mit Bestenliste und Checkpoints
|
||||
- ✨ Player-Inspector Modul
|
||||
- ✨ Config-Validierung mit Auto-Defaults
|
||||
- 🔧 JSON-Library auf Gson 2.10.1 aktualisiert
|
||||
- 🔧 Alle printStackTrace() durch Logger ersetzt
|
||||
- 🔧 Memory-Management verbessert (Tasks & Listeners)
|
||||
- 🔧 UpdateChecker mit proper JSON-Parsing
|
||||
- 🐛 Diverse Bug-Fixes und Performance-Optimierungen
|
||||
|
||||
---
|
||||
|
||||
**Copyright © 2026 - M_Viper - Alle Rechte vorbehalten**
|
||||
|
||||
Die unbefugte Vervielfältigung, Verbreitung oder Weitergabe dieses Plugins ist strafbar und wird rechtlich verfolgt.
|
||||
14
pom.xml
14
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>de.nexuslobby</groupId>
|
||||
<artifactId>NexusLobby</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>NexusLobby</name>
|
||||
@@ -57,10 +57,10 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>compile</scope>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.json.simple</pattern>
|
||||
<shadedPattern>de.nexuslobby.libs.json</shadedPattern>
|
||||
<pattern>com.google.gson</pattern>
|
||||
<shadedPattern>de.nexuslobby.libs.gson</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<filters>
|
||||
|
||||
@@ -23,7 +23,7 @@ import de.nexuslobby.modules.border.BorderModule;
|
||||
import de.nexuslobby.modules.parkour.ParkourManager;
|
||||
import de.nexuslobby.modules.parkour.ParkourListener;
|
||||
import de.nexuslobby.modules.player.PlayerInspectModule;
|
||||
import de.nexuslobby.modules.ball.SoccerModule; // NEU
|
||||
import de.nexuslobby.modules.ball.SoccerModule;
|
||||
import de.nexuslobby.utils.*;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
@@ -68,7 +68,7 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
private IntroModule introModule;
|
||||
private BorderModule borderModule;
|
||||
private ParkourManager parkourManager;
|
||||
private SoccerModule soccerModule; // NEU
|
||||
private SoccerModule soccerModule;
|
||||
|
||||
private ConversationManager conversationManager;
|
||||
|
||||
@@ -96,15 +96,28 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
return parkourManager;
|
||||
}
|
||||
|
||||
public SoccerModule getSoccerModule() { // NEU
|
||||
public SoccerModule getSoccerModule() {
|
||||
return soccerModule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
getLogger().info("");
|
||||
getLogger().info("[NexusLobby] _ __ __ __ __ ");
|
||||
getLogger().info("[NexusLobby] / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __");
|
||||
getLogger().info("[NexusLobby] / |/ / _ \\| |/_/ / / / ___/ / / __ \\ / __ \\/ __ \\/ / / /");
|
||||
getLogger().info("[NexusLobby] / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ / ");
|
||||
getLogger().info("[NexusLobby] /_/ |_/\\___/_/|_|\\__,_/____/_____/\\____/_.___/_.___/\\__, / ");
|
||||
getLogger().info("[NexusLobby] /____/ ");
|
||||
getLogger().info("[NexusLobby] ");
|
||||
getLogger().info("[NexusLobby] NexusLobby Plugin aktiviert! Version: " + getDescription().getVersion());
|
||||
|
||||
instance = this;
|
||||
|
||||
initCustomConfigs();
|
||||
initCustomConfigs();
|
||||
validateConfig();
|
||||
|
||||
// Lade die Sprachdatei
|
||||
LangManager.load(this);
|
||||
|
||||
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||
moduleManager = new ModuleManager(this);
|
||||
@@ -113,7 +126,7 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
this.parkourManager = new ParkourManager(this);
|
||||
this.conversationManager = new ConversationManager(this);
|
||||
|
||||
ArmorStandGUI.init();
|
||||
ArmorStandGUI.init();
|
||||
|
||||
registerModules();
|
||||
moduleManager.enableAll();
|
||||
@@ -133,8 +146,6 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
|
||||
registerCommands();
|
||||
checkUpdates();
|
||||
|
||||
getLogger().info("NexusLobby v" + getDescription().getVersion() + " wurde erfolgreich gestartet.");
|
||||
}
|
||||
|
||||
private void startAutoConversationTimer() {
|
||||
@@ -242,8 +253,8 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
moduleManager.registerModule(new PlayerInspectModule());
|
||||
|
||||
// Soccer Modul registrieren
|
||||
this.soccerModule = new SoccerModule(); // NEU
|
||||
moduleManager.registerModule(this.soccerModule); // NEU
|
||||
this.soccerModule = new SoccerModule();
|
||||
moduleManager.registerModule(this.soccerModule);
|
||||
|
||||
this.portalManager = new PortalManager(this);
|
||||
moduleManager.registerModule(portalManager);
|
||||
@@ -262,6 +273,11 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
getServer().getPluginManager().registerEvents(new NPCClickListener(), this);
|
||||
}
|
||||
|
||||
private void validateConfig() {
|
||||
ConfigValidator validator = new ConfigValidator(this, getConfig());
|
||||
validator.validate();
|
||||
}
|
||||
|
||||
public class NPCClickListener implements Listener {
|
||||
@EventHandler
|
||||
public void onNPCClick(PlayerInteractAtEntityEvent event) {
|
||||
@@ -280,7 +296,9 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
event.setJoinMessage(null);
|
||||
if (silentPlayers.contains(player.getUniqueId())) {
|
||||
event.setJoinMessage(null);
|
||||
}
|
||||
|
||||
teleportToSpawn(player);
|
||||
|
||||
@@ -289,7 +307,7 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
|
||||
BuildCommand.removePlayerFromBuildMode(player);
|
||||
|
||||
String defaultGmName = getConfig().getString("default-gamemode", "ADVENTURE");
|
||||
String defaultGmName = getConfig().getString("lobby.default-gamemode", "Adventure");
|
||||
try {
|
||||
player.setGameMode(GameMode.valueOf(defaultGmName.toUpperCase()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
@@ -297,17 +315,15 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
if (player.hasPermission("nexuslobby.admin") && updateAvailable) {
|
||||
player.sendMessage(" ");
|
||||
player.sendMessage("§8[§6Nexus§8] §aEin neues §6Update §afür §eNexusLobby §aist verfügbar!");
|
||||
player.sendMessage("§8» §7Version: §c" + getDescription().getVersion() + " §8-> §a" + latestVersion);
|
||||
|
||||
TextComponent link = new TextComponent("§8» §6Klicke §e§l[HIER] §6zum Herunterladen.");
|
||||
player.sendMessage("");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("update_available"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("update_version").replace("{old}", getDescription().getVersion()).replace("{new}", latestVersion));
|
||||
TextComponent link = new TextComponent(de.nexuslobby.utils.LangManager.get("update_download_link"));
|
||||
link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://git.viper.ipv64.net/M_Viper/NexusLobby/releases"));
|
||||
link.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
|
||||
new ComponentBuilder("§7Öffnet die Release-Seite").create()));
|
||||
|
||||
new ComponentBuilder(de.nexuslobby.utils.LangManager.get("update_download_hover")).create()));
|
||||
player.spigot().sendMessage(link);
|
||||
player.sendMessage(" ");
|
||||
player.sendMessage("");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +351,7 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
|
||||
File configFile = new File(getDataFolder(), "config.yml");
|
||||
if (!configFile.exists()) saveResource("config.yml", false);
|
||||
|
||||
|
||||
reloadConfig();
|
||||
|
||||
File settingsFile = new File(getDataFolder(), "settings.yml");
|
||||
@@ -343,7 +359,11 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
|
||||
visualsFile = new File(getDataFolder(), "visuals.yml");
|
||||
if (!visualsFile.exists()) saveResource("visuals.yml", false);
|
||||
|
||||
|
||||
// lang.yml automatisch erstellen, falls nicht vorhanden
|
||||
File langFile = new File(getDataFolder(), "lang.yml");
|
||||
if (!langFile.exists()) saveResource("lang.yml", false);
|
||||
|
||||
reloadVisualsConfig();
|
||||
Config.load();
|
||||
}
|
||||
@@ -360,10 +380,23 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Cancle alle Scheduler-Tasks
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
|
||||
// Stoppe spezifische Tasks
|
||||
ServerChecker.stopGlobalChecker();
|
||||
|
||||
// Unregister alle Event-Listener
|
||||
org.bukkit.event.HandlerList.unregisterAll((org.bukkit.plugin.Plugin) this);
|
||||
|
||||
// Schließe BungeeCord Channel
|
||||
getServer().getMessenger().unregisterOutgoingPluginChannel(this, "BungeeCord");
|
||||
|
||||
// Disable alle Module (inkl. eigenes Cleanup)
|
||||
if (moduleManager != null) {
|
||||
moduleManager.disableAll();
|
||||
}
|
||||
|
||||
getLogger().info("NexusLobby deaktiviert.");
|
||||
}
|
||||
|
||||
@@ -410,6 +443,21 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
getCommand("spawn").setTabCompleter(tabCompleter);
|
||||
}
|
||||
|
||||
if (getCommand("setstart") != null) {
|
||||
getCommand("setstart").setExecutor(nexusCommand);
|
||||
getCommand("setstart").setTabCompleter(tabCompleter);
|
||||
}
|
||||
|
||||
if (getCommand("setcheckpoint") != null) {
|
||||
getCommand("setcheckpoint").setExecutor(nexusCommand);
|
||||
getCommand("setcheckpoint").setTabCompleter(tabCompleter);
|
||||
}
|
||||
|
||||
if (getCommand("setfinish") != null) {
|
||||
getCommand("setfinish").setExecutor(nexusCommand);
|
||||
getCommand("setfinish").setTabCompleter(tabCompleter);
|
||||
}
|
||||
|
||||
if (getCommand("mapart") != null) getCommand("mapart").setTabCompleter(tabCompleter);
|
||||
if (getCommand("intro") != null) getCommand("intro").setTabCompleter(tabCompleter);
|
||||
|
||||
@@ -417,6 +465,11 @@ public class NexusLobby extends JavaPlugin implements Listener {
|
||||
getCommand("border").setExecutor(new BorderCommand());
|
||||
getCommand("border").setTabCompleter(tabCompleter);
|
||||
}
|
||||
|
||||
if (getCommand("serverswitcher") != null) {
|
||||
ServerSwitcherListener serverSwitcher = new ServerSwitcherListener();
|
||||
getCommand("serverswitcher").setExecutor(serverSwitcher);
|
||||
}
|
||||
}
|
||||
|
||||
public class NexusLobbyExpansion extends PlaceholderExpansion {
|
||||
|
||||
@@ -25,7 +25,6 @@ public class ModuleManager {
|
||||
*/
|
||||
public void enableAll() {
|
||||
for (Module module : modules) {
|
||||
plugin.getLogger().info("[NexusLobby] Enabling module: " + module.getName());
|
||||
module.onEnable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BuildCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
// Gamemode zurücksetzen
|
||||
String defaultGmName = NexusLobby.getInstance().getConfig().getString("default-gamemode", "ADVENTURE");
|
||||
String defaultGmName = NexusLobby.getInstance().getConfig().getString("lobby.default-gamemode", "Adventure");
|
||||
try {
|
||||
GameMode gm = GameMode.valueOf(defaultGmName.toUpperCase());
|
||||
player.setGameMode(gm);
|
||||
|
||||
@@ -33,6 +33,12 @@ public class GivePortalToolCommand implements CommandExecutor {
|
||||
// Erstelle das Item
|
||||
ItemStack wand = new ItemStack(Material.BLAZE_ROD);
|
||||
ItemMeta meta = wand.getItemMeta();
|
||||
if (meta == null) {
|
||||
p.getInventory().addItem(wand);
|
||||
p.sendMessage(plugin.getName() + " §aDu hast das Portal-Werkzeug erhalten!");
|
||||
p.playSound(p.getLocation(), org.bukkit.Sound.ENTITY_ITEM_PICKUP, 1.0f, 1.0f);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Design des Items
|
||||
meta.setDisplayName("§cPortal-Werkzeug");
|
||||
|
||||
@@ -45,9 +45,9 @@ public class LobbyTabCompleter implements TabCompleter {
|
||||
suggestions.addAll(Arrays.asList("on", "off"));
|
||||
} else if (args[0].equalsIgnoreCase("parkour")) {
|
||||
suggestions.addAll(Arrays.asList("setstart", "setfinish", "setcheckpoint", "reset", "clear", "removeall"));
|
||||
} else if (args[0].equalsIgnoreCase("ball")) { // NEU: Ball Subcommands
|
||||
} else if (args[0].equalsIgnoreCase("ball")) {
|
||||
if (sender.hasPermission("nexuslobby.admin")) {
|
||||
suggestions.addAll(Arrays.asList("setspawn", "reload"));
|
||||
suggestions.addAll(Arrays.asList("setspawn", "respawn", "remove"));
|
||||
}
|
||||
}
|
||||
} else if (args.length == 3) {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
|
||||
if (!(sender instanceof Player player)) {
|
||||
sender.sendMessage("§cDieser Befehl ist nur für Spieler!");
|
||||
sender.sendMessage(de.nexuslobby.utils.LangManager.get("only_player"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -40,12 +40,13 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
if (cmdName.equalsIgnoreCase("setcheckpoint")) {
|
||||
if (!player.hasPermission("nexuslobby.admin")) return noPerm(player);
|
||||
pm.setCheckpoint(player, player.getLocation());
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_checkpoint_set"));
|
||||
return true;
|
||||
}
|
||||
if (cmdName.equalsIgnoreCase("setfinish")) {
|
||||
if (!player.hasPermission("nexuslobby.admin")) return noPerm(player);
|
||||
pm.setFinishLocation(player.getLocation());
|
||||
player.sendMessage("§8[§6Nexus§8] §aParkour-Zielpunkt gesetzt!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_finish_set"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,12 +58,12 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
if (loc != null) {
|
||||
player.teleport(loc);
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 1.0f, 1.2f);
|
||||
player.sendMessage("§8[§6Nexus§8] §aDu wurdest zum Spawn teleportiert.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("teleport_spawn"));
|
||||
} else {
|
||||
player.sendMessage("§cFehler: Die Spawn-Welt existiert nicht.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("spawn_world_missing"));
|
||||
}
|
||||
} else {
|
||||
player.sendMessage("§cEs wurde noch kein Spawn gesetzt.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("spawn_not_set"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -77,7 +78,7 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
case "reload":
|
||||
if (!player.hasPermission("nexuslobby.admin")) return noPerm(player);
|
||||
NexusLobby.getInstance().reloadPlugin();
|
||||
player.sendMessage("§8[§6Nexus§8] §aPlugin erfolgreich neu geladen!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("plugin_reloaded"));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1f, 1.5f);
|
||||
break;
|
||||
|
||||
@@ -92,17 +93,17 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
config.set("spawn.yaw", (double) loc.getYaw());
|
||||
config.set("spawn.pitch", (double) loc.getPitch());
|
||||
NexusLobby.getInstance().saveConfig();
|
||||
player.sendMessage("§8[§6Nexus§8] §aLobby-Spawn erfolgreich gesetzt!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("spawn_set"));
|
||||
break;
|
||||
|
||||
case "silentjoin":
|
||||
if (!player.hasPermission("nexuslobby.silentjoin")) return noPerm(player);
|
||||
if (NexusLobby.getInstance().getSilentPlayers().contains(player.getUniqueId())) {
|
||||
NexusLobby.getInstance().getSilentPlayers().remove(player.getUniqueId());
|
||||
player.sendMessage("§8[§6Nexus§8] §7Silent Join: §cDeaktiviert");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("silentjoin_off"));
|
||||
} else {
|
||||
NexusLobby.getInstance().getSilentPlayers().add(player.getUniqueId());
|
||||
player.sendMessage("§8[§6Nexus§8] §7Silent Join: §aAktiviert");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("silentjoin_on"));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -114,12 +115,12 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
if (NexusLobby.getInstance().getSoccerModule() != null) {
|
||||
return NexusLobby.getInstance().getSoccerModule().onCommand(sender, command, label, args);
|
||||
}
|
||||
player.sendMessage("§cDas Fußball-Modul ist nicht geladen.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("soccer_module_not_loaded"));
|
||||
break;
|
||||
|
||||
case "parkour":
|
||||
if (args.length < 2) {
|
||||
player.sendMessage("§8[§6Nexus§8] §7Nutze: §e/nexus parkour <setstart|setfinish|setcheckpoint|reset|clear|removeall>");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_usage"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -132,26 +133,26 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
break;
|
||||
case "setfinish":
|
||||
pm.setFinishLocation(player.getLocation());
|
||||
player.sendMessage("§8[§6Nexus§8] §aParkour-Zielpunkt gesetzt!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_finish_set"));
|
||||
break;
|
||||
case "setcheckpoint":
|
||||
pm.setCheckpoint(player, player.getLocation());
|
||||
break;
|
||||
case "reset":
|
||||
pm.stopParkour(player);
|
||||
player.sendMessage("§8[§6Nexus§8] §7Dein aktueller Lauf wurde abgebrochen.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_run_aborted"));
|
||||
break;
|
||||
case "clear":
|
||||
pm.clearStats();
|
||||
player.sendMessage("§8[§6Nexus§8] §aAlle Parkour-Bestzeiten wurden gelöscht!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_besttimes_cleared"));
|
||||
break;
|
||||
case "removeall":
|
||||
pm.removeAllPoints();
|
||||
player.sendMessage("§8[§6Nexus§8] §cDie gesamte Strecke (Checkpoints & Ziel) wurde gelöscht!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_track_removed"));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1f, 1f);
|
||||
break;
|
||||
default:
|
||||
player.sendMessage("§cUnbekannter Unterbefehl.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("unknown_subcommand"));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -180,26 +181,25 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
|
||||
if (targetAs != null) {
|
||||
targetAs.addScoreboardTag("parkour_npc");
|
||||
player.sendMessage("§8[§6Nexus§8] §aArmorStand als Parkour-NPC markiert!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_npc_marked"));
|
||||
}
|
||||
|
||||
pm.setStartLocation(player.getLocation());
|
||||
player.sendMessage("§8[§6Nexus§8] §aParkour-Startpunkt an deiner Position gesetzt!");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("parkour_start_set"));
|
||||
}
|
||||
|
||||
private boolean noPerm(Player player) {
|
||||
player.sendMessage("§cKeine Berechtigung.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("no_permission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
private void handleScoreboard(Player player, String[] args) {
|
||||
if (args.length < 2) {
|
||||
player.sendMessage("§cBenutzung: /nexus sb <on|off|admin|spieler>");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("scoreboard_usage"));
|
||||
return;
|
||||
}
|
||||
ScoreboardModule sbModule = (ScoreboardModule) NexusLobby.getInstance().getModuleManager().getModule(ScoreboardModule.class);
|
||||
if (sbModule == null) {
|
||||
player.sendMessage("§cScoreboard-Modul ist deaktiviert.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("scoreboard_module_disabled"));
|
||||
return;
|
||||
}
|
||||
String sub = args[1].toLowerCase();
|
||||
@@ -208,11 +208,11 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
case "off": sbModule.setVisibility(player, false); break;
|
||||
case "admin":
|
||||
if (player.hasPermission("nexuslobby.scoreboard.admin")) sbModule.setAdminMode(player, true);
|
||||
else player.sendMessage("§cKeine Rechte.");
|
||||
else player.sendMessage(de.nexuslobby.utils.LangManager.get("no_permission"));
|
||||
break;
|
||||
case "spieler":
|
||||
if (player.hasPermission("nexuslobby.scoreboard.admin")) sbModule.setAdminMode(player, false);
|
||||
else player.sendMessage("§cKeine Rechte.");
|
||||
else player.sendMessage(de.nexuslobby.utils.LangManager.get("no_permission"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -226,16 +226,16 @@ public class NexusLobbyCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void sendInfo(Player player) {
|
||||
player.sendMessage("§8§m--------------------------------------");
|
||||
player.sendMessage("§6§lNexusLobby §7- Informationen");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_header"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_title"));
|
||||
player.sendMessage("");
|
||||
player.sendMessage("§f/spawn §7- Zum Spawn");
|
||||
player.sendMessage("§f/setstart §8| §f/setcheckpoint §8| §f/setfinish");
|
||||
player.sendMessage("§f/nexus parkour removeall §7- Strecke löschen");
|
||||
player.sendMessage("§f/nexus ball setspawn §7- Fußball Spawn setzen"); // NEU
|
||||
player.sendMessage("§f/nexus setspawn §7- Spawn setzen");
|
||||
player.sendMessage("§f/nexus sb <on|off> §7- Scoreboard");
|
||||
player.sendMessage("§f/nexus reload §7- Config laden");
|
||||
player.sendMessage("§8§m--------------------------------------");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_spawn"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_parkour"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_removeall"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_ball"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_setspawn"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_scoreboard"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_reload"));
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("info_footer"));
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,11 @@ public class ItemsModule implements Module, Listener {
|
||||
// 2. Gadget GUI Logik
|
||||
String gadgetName = colorize(config.getString("items.lobby-tools.gadget.displayname", "&bGadgets"));
|
||||
if (displayName.equals(gadgetName)) {
|
||||
// Öffnet die GUI aus dem GadgetModule
|
||||
NexusLobby.getInstance().getGadgetModule().openGUI(player);
|
||||
// Öffnet die GUI aus dem GadgetModule (falls vorhanden)
|
||||
var gadgetModule = NexusLobby.getInstance().getGadgetModule();
|
||||
if (gadgetModule != null) {
|
||||
gadgetModule.openGUI(player);
|
||||
}
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,9 +15,14 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ScoreboardModule implements Module {
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
public class ScoreboardModule implements Module, Listener {
|
||||
|
||||
private final NexusLobby plugin = NexusLobby.getInstance();
|
||||
private boolean placeholderAPIEnabled;
|
||||
|
||||
// Speicher für die aktuellen Spieler-Einstellungen (bis zum Restart/Reload)
|
||||
private final Set<UUID> hiddenPlayers = new HashSet<>();
|
||||
@@ -33,6 +38,11 @@ public class ScoreboardModule implements Module {
|
||||
FileConfiguration vConfig = plugin.getVisualsConfig();
|
||||
if (!vConfig.getBoolean("scoreboard.enabled", true)) return;
|
||||
|
||||
// Listener registrieren
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
|
||||
placeholderAPIEnabled = Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null;
|
||||
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -43,6 +53,21 @@ public class ScoreboardModule implements Module {
|
||||
}.runTaskTimer(plugin, 0L, vConfig.getLong("scoreboard.update_ticks", 20L));
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt Scoreboard-Status beim Join gemäß config.yml (scoreboard-default-visible)
|
||||
*/
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
boolean defaultVisible = plugin.getConfig().getBoolean("scoreboard-default-visible", true);
|
||||
if (!defaultVisible) {
|
||||
hiddenPlayers.add(player.getUniqueId());
|
||||
player.setScoreboard(Bukkit.getScoreboardManager().getMainScoreboard());
|
||||
} else {
|
||||
hiddenPlayers.remove(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSidebar(Player player) {
|
||||
// 1. Prüfen, ob der Spieler das Scoreboard ausgeblendet hat
|
||||
if (hiddenPlayers.contains(player.getUniqueId())) {
|
||||
@@ -124,7 +149,14 @@ public class ScoreboardModule implements Module {
|
||||
}
|
||||
|
||||
private String translate(Player player, String text) {
|
||||
String translated = PlaceholderAPI.setPlaceholders(player, text);
|
||||
String translated = text;
|
||||
if (placeholderAPIEnabled) {
|
||||
try {
|
||||
translated = PlaceholderAPI.setPlaceholders(player, text);
|
||||
} catch (NoClassDefFoundError ignored) {
|
||||
// PlaceholderAPI fehlt zur Laufzeit
|
||||
}
|
||||
}
|
||||
return ChatColor.translateAlternateColorCodes('&', translated);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
if (!(sender instanceof Player p)) return true;
|
||||
|
||||
if (!p.hasPermission("nexuslobby.armorstand.cmd")) {
|
||||
p.sendMessage(prefix + "§cKeine Berechtigung!");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("no_permission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
case "select4":
|
||||
ArmorStand target = getTargetArmorStand(p);
|
||||
if (target == null) {
|
||||
p.sendMessage(prefix + "§cDu musst einen ArmorStand direkt anschauen (Fadenkreuz)!");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("armorstand_lookat_required"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,11 +69,11 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
|
||||
case "link":
|
||||
if (args.length < 3) {
|
||||
p.sendMessage(prefix + "§cNutze: /nexuscmd conv link <Dialog-ID>");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_link_usage"));
|
||||
return true;
|
||||
}
|
||||
if (!p.hasMetadata("conv_npc1") || !p.hasMetadata("conv_npc2")) {
|
||||
p.sendMessage(prefix + "§cBitte markiere mindestens die ersten beiden NPCs (select1 & select2)!");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_mark_npcs"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
// Im Manager speichern (Nutzt die erweiterte Methode für Gruppen)
|
||||
NexusLobby.getInstance().getConversationManager().saveLinkExtended(id1, id2, id3, id4, dialogId);
|
||||
|
||||
p.sendMessage(prefix + "§a§lDauerhafte Verknüpfung erstellt!");
|
||||
p.sendMessage(prefix + "§7Beteiligte NPCs: §e" + (id3 == null ? "2" : (id4 == null ? "3" : "4")));
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_link_created"));
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_link_npcs").replace("{count}", (id3 == null ? "2" : (id4 == null ? "3" : "4"))));
|
||||
p.spawnParticle(Particle.HAPPY_VILLAGER, as1.getLocation().add(0, 1.5, 0), 20, 0.4, 0.4, 0.4, 0.1);
|
||||
|
||||
// Metadaten nach dem Linken aufräumen
|
||||
@@ -111,14 +111,14 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
p.removeMetadata("conv_npc3", NexusLobby.getInstance());
|
||||
p.removeMetadata("conv_npc4", NexusLobby.getInstance());
|
||||
} else {
|
||||
p.sendMessage(prefix + "§cFehler: Sprecher 1 nicht gefunden.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_speaker_not_found"));
|
||||
}
|
||||
break;
|
||||
|
||||
case "unlink":
|
||||
ArmorStand targetUnlink = getTargetArmorStand(p);
|
||||
if (targetUnlink == null) {
|
||||
p.sendMessage(prefix + "§cSchau den NPC an, dessen Verknüpfung du lösen willst!");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_unlink_lookat"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -128,17 +128,17 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
// Aus Konfiguration löschen
|
||||
NexusLobby.getInstance().getConversationManager().removeLink(targetUnlink.getUniqueId());
|
||||
|
||||
p.sendMessage(prefix + "§eNPC-Verknüpfung wurde aufgehoben.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_unlinked"));
|
||||
p.spawnParticle(Particle.SMOKE, targetUnlink.getLocation().add(0, 1.0, 0), 20, 0.2, 0.2, 0.2, 0.02);
|
||||
break;
|
||||
|
||||
case "start":
|
||||
if (args.length < 3) {
|
||||
p.sendMessage(prefix + "§cNutze: /nexuscmd conv start <ID>");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_start_usage"));
|
||||
return true;
|
||||
}
|
||||
if (!p.hasMetadata("conv_npc1") || !p.hasMetadata("conv_npc2")) {
|
||||
p.sendMessage(prefix + "§cBitte markiere mindestens zwei NPCs!");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("conv_mark_two_npcs"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
ArmorStand target = getTargetArmorStand(p);
|
||||
|
||||
if (args[0].equalsIgnoreCase("say") && args.length >= 2) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cSchau einen ArmorStand an!"); return true; }
|
||||
if (target == null) { p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("armorstand_lookat_required")); return true; }
|
||||
|
||||
String text = buildString(args, 1);
|
||||
String colored = ChatColor.translateAlternateColorCodes('&', text);
|
||||
@@ -171,25 +171,25 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
// Nutzt die showBubble-Logik aus dem ConversationManager (Ohne Partner-Zwang)
|
||||
NexusLobby.getInstance().getConversationManager().showBubble(target, colored);
|
||||
|
||||
p.sendMessage(prefix + "§aNPC-Sprechblase gesendet.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("npc_bubble_sent"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("lookat")) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cSchau einen ArmorStand an!"); return true; }
|
||||
if (target == null) { p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("armorstand_lookat_required")); return true; }
|
||||
if (target.getScoreboardTags().contains("as_lookat")) {
|
||||
target.removeScoreboardTag("as_lookat");
|
||||
target.setHeadPose(new EulerAngle(0, 0, 0));
|
||||
p.sendMessage(prefix + "§cBlickkontakt aus.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("lookat_off"));
|
||||
} else {
|
||||
target.addScoreboardTag("as_lookat");
|
||||
p.sendMessage(prefix + "§aBlickkontakt an.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("lookat_on"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("name") && args.length >= 2) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cSchau einen ArmorStand an!"); return true; }
|
||||
if (target == null) { p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("armorstand_lookat_required")); return true; }
|
||||
String nameInput = buildString(args, 1);
|
||||
|
||||
// Wichtig: Alle alten Namens-Tags entfernen für Konsistenz
|
||||
@@ -198,7 +198,7 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
if (nameInput.equalsIgnoreCase("none")) {
|
||||
target.setCustomName("");
|
||||
target.setCustomNameVisible(false);
|
||||
p.sendMessage(prefix + "§eName entfernt.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("name_removed"));
|
||||
} else {
|
||||
String colored = ChatColor.translateAlternateColorCodes('&', nameInput);
|
||||
target.setCustomName(colored);
|
||||
@@ -208,33 +208,33 @@ public class ArmorStandCmdExecutor implements CommandExecutor {
|
||||
// ":" wird durch "§§" ersetzt, um Probleme in Scoreboard-Tags zu vermeiden
|
||||
target.addScoreboardTag("as_displayname:" + nameInput.replace(":", "§§"));
|
||||
|
||||
p.sendMessage(prefix + "§7Name gesetzt: " + colored);
|
||||
p.sendMessage(prefix + "§8(Status-Backup wurde gespeichert)");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("name_set").replace("{name}", colored));
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("status_backup_saved"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("add") && args.length >= 5) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cSchau einen ArmorStand an!"); return true; }
|
||||
if (target == null) { p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("armorstand_lookat_required")); return true; }
|
||||
String slot1 = args[1], slot2 = args[2], type = args[3].toLowerCase();
|
||||
String cmdStr = buildString(args, 4);
|
||||
|
||||
target.addScoreboardTag("ascmd:" + slot1 + ":" + slot2 + ":" + type + ":" + cmdStr);
|
||||
p.sendMessage(prefix + "§aBefehl gebunden.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("command_bound"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("list")) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cKein Ziel!"); return true; }
|
||||
p.sendMessage("§6§lBefehle & Tags:");
|
||||
if (target == null) { p.sendMessage(de.nexuslobby.utils.LangManager.get("no_target")); return true; }
|
||||
p.sendMessage(de.nexuslobby.utils.LangManager.get("commands_and_tags"));
|
||||
target.getScoreboardTags().forEach(t -> p.sendMessage(" §8» §e" + t));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("remove")) {
|
||||
if (target == null) { p.sendMessage(prefix + "§cKein Ziel!"); return true; }
|
||||
if (target == null) { p.sendMessage(de.nexuslobby.utils.LangManager.get("no_target")); return true; }
|
||||
target.getScoreboardTags().removeIf(tag -> tag.startsWith("ascmd:"));
|
||||
p.sendMessage(prefix + "§eAlle Befehle gelöscht.");
|
||||
p.sendMessage(prefix + de.nexuslobby.utils.LangManager.get("commands_removed"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ public class ArmorStandPoseGUI {
|
||||
private static ItemStack createPartIcon(Material mat, String name, EulerAngle angle) {
|
||||
ItemStack item = new ItemStack(mat);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return item;
|
||||
meta.setDisplayName(name);
|
||||
meta.setLore(Arrays.asList(
|
||||
"§8Rotation:",
|
||||
@@ -64,6 +65,7 @@ public class ArmorStandPoseGUI {
|
||||
private static ItemStack createAxisItem(Material mat, String name, double angleRad) {
|
||||
ItemStack item = new ItemStack(mat);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return item;
|
||||
meta.setDisplayName(name);
|
||||
meta.setLore(Arrays.asList(
|
||||
"§7Aktueller Winkel: §f" + Math.round(Math.toDegrees(angleRad)) + "°",
|
||||
@@ -78,6 +80,7 @@ public class ArmorStandPoseGUI {
|
||||
private static ItemStack createNamedItem(Material mat, String name) {
|
||||
ItemStack item = new ItemStack(mat);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return item;
|
||||
meta.setDisplayName(name);
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
|
||||
@@ -265,7 +265,11 @@ public class ConversationManager {
|
||||
}
|
||||
|
||||
private void saveConfig() {
|
||||
try { config.save(file); } catch (IOException e) { e.printStackTrace(); }
|
||||
try {
|
||||
config.save(file);
|
||||
} catch (IOException e) {
|
||||
Bukkit.getLogger().severe("Fehler beim Speichern der Conversations: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
|
||||
@@ -27,7 +27,6 @@ public class DynamicArmorStandModule implements Module {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
startUpdateTask();
|
||||
Bukkit.getLogger().info("§a[NexusLobby] DynamicArmorStandModule aktiv: Ingame-Zeit & Sternen-Effekt geladen.");
|
||||
}
|
||||
|
||||
private void startUpdateTask() {
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
import org.bukkit.profile.PlayerTextures;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
@@ -29,12 +28,31 @@ import java.util.Objects;
|
||||
|
||||
public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
// Ball Konstanten
|
||||
private static final String TEXTURE_URL = "http://textures.minecraft.net/texture/451f8cfcfb85d77945dc6a3618414093e70436b46d2577b28c727f1329b7265e";
|
||||
private static final String BALL_TAG = "nexusball_entity";
|
||||
private static final String BALL_NAME = "NexusBall";
|
||||
|
||||
// Physik Konstanten
|
||||
private static final double DRIBBLE_DETECTION_RADIUS = 0.7;
|
||||
private static final double DRIBBLE_HEIGHT = 0.5;
|
||||
private static final double DRIBBLE_FORCE = 0.35;
|
||||
private static final double DRIBBLE_LIFT = 0.12;
|
||||
private static final double KICK_FORCE = 1.35;
|
||||
private static final double KICK_LIFT = 0.38;
|
||||
private static final double WALL_BOUNCE_DAMPING = 0.75;
|
||||
private static final double WALL_CHECK_DISTANCE = 1.3;
|
||||
private static final double VOID_THRESHOLD = -5.0;
|
||||
private static final double CLEANUP_RADIUS = 5.0;
|
||||
|
||||
// Particle Konstanten
|
||||
private static final double PARTICLE_SPEED_HIGH = 0.85;
|
||||
private static final double PARTICLE_SPEED_MEDIUM = 0.45;
|
||||
private static final double PARTICLE_SPEED_MIN = 0.05;
|
||||
|
||||
private ArmorStand ball;
|
||||
private Location spawnLocation;
|
||||
private long lastMoveTime;
|
||||
private final String TEXTURE_URL = "http://textures.minecraft.net/texture/451f8cfcfb85d77945dc6a3618414093e70436b46d2577b28c727f1329b7265e";
|
||||
private final String BALL_TAG = "nexusball_entity"; // Eindeutiges Tag zur Identifizierung
|
||||
private final String BALL_NAME = "§x§N§e§x§u§s§B§a§l§l"; // Zusätzliche Erkennung
|
||||
|
||||
@Override
|
||||
public String getName() { return "Soccer"; }
|
||||
@@ -48,43 +66,21 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
loadConfigLocation();
|
||||
|
||||
// AGGRESSIVES MEHRFACHES CLEANUP-SYSTEM
|
||||
// 1. Sofort beim Enable
|
||||
removeAllOldBallsGlobal();
|
||||
// Optimiertes Cleanup-System: 3 Phasen statt 6
|
||||
removeAllOldBalls();
|
||||
|
||||
// 2. Nach 0.5 Sekunden
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), this::removeAllOldBallsGlobal, 10L);
|
||||
|
||||
// 3. Nach 1 Sekunde
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), this::removeAllOldBallsGlobal, 20L);
|
||||
|
||||
// 4. Nach 2 Sekunden - cleanup und dann spawnen
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), () -> {
|
||||
removeAllOldBallsGlobal();
|
||||
removeAllOldBalls();
|
||||
spawnBall();
|
||||
}, 40L);
|
||||
}, 40L); // Nach 2 Sekunden
|
||||
|
||||
// 5. Nach 3 Sekunden - finales Cleanup für hartnäckige Duplikate
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), this::removeAllOldBallsGlobal, 60L);
|
||||
|
||||
// 6. Nach 5 Sekunden - letzter Check
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), this::removeAllOldBallsGlobal, 100L);
|
||||
Bukkit.getScheduler().runTaskLater(NexusLobby.getInstance(), this::removeAllOldBalls, 100L); // Finaler Check nach 5 Sekunden
|
||||
|
||||
// Haupt-Physik & Anti-Klon Tick
|
||||
// Haupt-Physik & Anti-Duplikat System
|
||||
Bukkit.getScheduler().runTaskTimer(NexusLobby.getInstance(), () -> {
|
||||
|
||||
// ANTI-KLON-SYSTEM: Prüfe die Umgebung des Spawns auf illegale Kopien
|
||||
if (spawnLocation != null && spawnLocation.getWorld() != null) {
|
||||
for (Entity entity : spawnLocation.getWorld().getNearbyEntities(spawnLocation, 50, 50, 50)) {
|
||||
if (entity instanceof ArmorStand stand) {
|
||||
// Wenn der ArmorStand unser Tag hat, aber nicht unsere aktive Instanz ist -> Löschen
|
||||
if (stand.getScoreboardTags().contains(BALL_TAG)) {
|
||||
if (ball == null || !stand.getUniqueId().equals(ball.getUniqueId())) {
|
||||
stand.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Anti-Duplikat-Check (optimiert: nur in Ball-Welt)
|
||||
if (ball != null && ball.isValid()) {
|
||||
removeDuplicateBalls();
|
||||
}
|
||||
|
||||
if (ball == null || !ball.isValid()) return;
|
||||
@@ -94,100 +90,146 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
handleWallBounce(vel);
|
||||
handleParticles(speed);
|
||||
|
||||
// Dribbel-Logik
|
||||
for (Entity nearby : ball.getNearbyEntities(0.7, 0.5, 0.7)) {
|
||||
if (nearby instanceof Player p) {
|
||||
Vector direction = ball.getLocation().toVector().subtract(p.getLocation().toVector());
|
||||
if (direction.lengthSquared() > 0) {
|
||||
direction.normalize();
|
||||
direction.setY(0.12);
|
||||
ball.setVelocity(direction.multiply(0.35));
|
||||
}
|
||||
lastMoveTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
handleDribbling();
|
||||
|
||||
// Automatischer Respawn bei Inaktivität oder Void
|
||||
long delay = NexusLobby.getInstance().getConfig().getLong("ball.respawn_delay", 60) * 1000;
|
||||
if (System.currentTimeMillis() - lastMoveTime > delay || ball.getLocation().getY() < -5) {
|
||||
long respawnDelayMs = NexusLobby.getInstance().getConfig().getLong("ball.respawn_delay", 60) * 1000;
|
||||
if (System.currentTimeMillis() - lastMoveTime > respawnDelayMs || ball.getLocation().getY() < VOID_THRESHOLD) {
|
||||
respawnBall();
|
||||
}
|
||||
}, 1L, 1L);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scannt ALLE Welten nach Entities mit dem BALL_TAG und entfernt sie.
|
||||
* Nutzt mehrere Erkennungsmethoden für maximale Sicherheit.
|
||||
* Optimierte Dribbel-Logik: Ball folgt nahen Spielern
|
||||
*/
|
||||
private void removeAllOldBallsGlobal() {
|
||||
int removed = 0;
|
||||
// Alle Welten durchsuchen
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
for (Entity entity : world.getEntities()) {
|
||||
if (entity instanceof ArmorStand stand) {
|
||||
boolean shouldRemove = false;
|
||||
|
||||
// Methode 1: Tag-basiert
|
||||
if (stand.getScoreboardTags().contains(BALL_TAG)) {
|
||||
shouldRemove = true;
|
||||
}
|
||||
|
||||
// Methode 2: Name-basiert (falls Tags verloren gehen)
|
||||
if (stand.getCustomName() != null && stand.getCustomName().equals(BALL_NAME)) {
|
||||
shouldRemove = true;
|
||||
}
|
||||
|
||||
// Methode 3: Kopf-Textur-basiert (prüfe ob es ein Soccer-Ball Kopf ist)
|
||||
if (stand.getEquipment() != null && stand.getEquipment().getHelmet() != null) {
|
||||
ItemStack helmet = stand.getEquipment().getHelmet();
|
||||
if (helmet.getType() == Material.PLAYER_HEAD && helmet.hasItemMeta()) {
|
||||
SkullMeta meta = (SkullMeta) helmet.getItemMeta();
|
||||
if (meta.hasOwner() && meta.getOwnerProfile() != null) {
|
||||
PlayerProfile profile = meta.getOwnerProfile();
|
||||
if (profile.getName() != null && profile.getName().equals("SoccerBall")) {
|
||||
shouldRemove = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Methode 4: Position-basiert - Entferne alle unsichtbaren, kleinen ArmorStands in der Nähe des Spawns
|
||||
if (spawnLocation != null && spawnLocation.getWorld() != null &&
|
||||
stand.getWorld().equals(spawnLocation.getWorld()) &&
|
||||
stand.isSmall() && stand.isInvisible() && !stand.hasBasePlate()) {
|
||||
|
||||
double distance = stand.getLocation().distance(spawnLocation);
|
||||
// Wenn innerhalb von 5 Blöcken vom Spawn und hat einen Kopf
|
||||
if (distance < 5.0 && stand.getEquipment() != null &&
|
||||
stand.getEquipment().getHelmet() != null &&
|
||||
stand.getEquipment().getHelmet().getType() == Material.PLAYER_HEAD) {
|
||||
shouldRemove = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Nur entfernen wenn es NICHT unsere aktuelle Ball-Instanz ist
|
||||
if (shouldRemove && (ball == null || !stand.getUniqueId().equals(ball.getUniqueId()))) {
|
||||
stand.remove();
|
||||
removed++;
|
||||
}
|
||||
private void handleDribbling() {
|
||||
if (ball == null || !ball.isValid()) return;
|
||||
|
||||
for (Entity nearby : ball.getNearbyEntities(DRIBBLE_DETECTION_RADIUS, DRIBBLE_HEIGHT, DRIBBLE_DETECTION_RADIUS)) {
|
||||
if (nearby instanceof Player p) {
|
||||
Vector direction = ball.getLocation().toVector().subtract(p.getLocation().toVector());
|
||||
if (direction.lengthSquared() > 0) {
|
||||
direction.normalize();
|
||||
direction.setY(DRIBBLE_LIFT);
|
||||
ball.setVelocity(direction.multiply(DRIBBLE_FORCE));
|
||||
lastMoveTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Entfernt Duplikate in der Umgebung des aktiven Balls (Performance-optimiert)
|
||||
*/
|
||||
private void removeDuplicateBalls() {
|
||||
if (ball == null || !ball.isValid() || ball.getLocation().getWorld() == null) return;
|
||||
|
||||
for (Entity entity : ball.getLocation().getWorld().getNearbyEntities(ball.getLocation(), 50, 50, 50)) {
|
||||
if (entity instanceof ArmorStand stand && isBallEntity(stand)) {
|
||||
if (!stand.getUniqueId().equals(ball.getUniqueId())) {
|
||||
stand.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Entfernt alle Ball-Entities (nur in relevanter Welt wenn Spawn gesetzt)
|
||||
*/
|
||||
private void removeAllOldBalls() {
|
||||
int removed = 0;
|
||||
|
||||
// Wenn Spawn-Location gesetzt ist, nur diese Welt durchsuchen (Performance!)
|
||||
if (spawnLocation != null && spawnLocation.getWorld() != null) {
|
||||
removed = cleanupBallsInWorld(spawnLocation.getWorld());
|
||||
} else {
|
||||
// Sonst alle Welten durchsuchen
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
removed += cleanupBallsInWorld(world);
|
||||
}
|
||||
}
|
||||
|
||||
if (removed > 0) {
|
||||
Bukkit.getLogger().info("[NexusLobby] " + removed + " alte Ball-Entities entfernt.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup für eine einzelne Welt
|
||||
*/
|
||||
private int cleanupBallsInWorld(World world) {
|
||||
int removed = 0;
|
||||
for (Entity entity : world.getEntities()) {
|
||||
if (entity instanceof ArmorStand stand && isBallEntity(stand)) {
|
||||
if (ball == null || !stand.getUniqueId().equals(ball.getUniqueId())) {
|
||||
stand.remove();
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft ob ein ArmorStand ein Ball ist (Mehrere Erkennungsmethoden)
|
||||
*/
|
||||
private boolean isBallEntity(ArmorStand stand) {
|
||||
// Methode 1: Tag-basiert (primär)
|
||||
if (stand.getScoreboardTags().contains(BALL_TAG)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Methode 2: Name-basiert
|
||||
if (stand.getCustomName() != null && stand.getCustomName().equals(BALL_NAME)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Methode 3: Profil-basiert (Kopf-Textur)
|
||||
if (stand.getEquipment() != null && stand.getEquipment().getHelmet() != null) {
|
||||
ItemStack helmet = stand.getEquipment().getHelmet();
|
||||
if (helmet.getType() == Material.PLAYER_HEAD && helmet.hasItemMeta()) {
|
||||
SkullMeta meta = (SkullMeta) helmet.getItemMeta();
|
||||
if (meta.hasOwner() && meta.getOwnerProfile() != null) {
|
||||
if (BALL_NAME.equals(meta.getOwnerProfile().getName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Methode 4: Eigenschaften-basiert (nur wenn Spawn gesetzt)
|
||||
if (spawnLocation != null && spawnLocation.getWorld() != null &&
|
||||
stand.getWorld().equals(spawnLocation.getWorld()) &&
|
||||
stand.isSmall() && stand.isInvisible() && !stand.hasBasePlate()) {
|
||||
|
||||
double distance = stand.getLocation().distance(spawnLocation);
|
||||
if (distance < CLEANUP_RADIUS && stand.getEquipment() != null &&
|
||||
stand.getEquipment().getHelmet() != null &&
|
||||
stand.getEquipment().getHelmet().getType() == Material.PLAYER_HEAD) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void handleWallBounce(Vector vel) {
|
||||
if (vel.lengthSquared() < 0.001) return;
|
||||
|
||||
Location loc = ball.getLocation();
|
||||
Block nextX = loc.clone().add(vel.getX() * 1.3, 0.5, 0).getBlock();
|
||||
Block nextZ = loc.clone().add(0, 0.5, vel.getZ() * 1.3).getBlock();
|
||||
Block nextX = loc.clone().add(vel.getX() * WALL_CHECK_DISTANCE, 0.5, 0).getBlock();
|
||||
Block nextZ = loc.clone().add(0, 0.5, vel.getZ() * WALL_CHECK_DISTANCE).getBlock();
|
||||
|
||||
boolean bounced = false;
|
||||
if (nextX.getType().isSolid()) { vel.setX(-vel.getX() * 0.75); bounced = true; }
|
||||
if (nextZ.getType().isSolid()) { vel.setZ(-vel.getZ() * 0.75); bounced = true; }
|
||||
if (nextX.getType().isSolid()) {
|
||||
vel.setX(-vel.getX() * WALL_BOUNCE_DAMPING);
|
||||
bounced = true;
|
||||
}
|
||||
if (nextZ.getType().isSolid()) {
|
||||
vel.setZ(-vel.getZ() * WALL_BOUNCE_DAMPING);
|
||||
bounced = true;
|
||||
}
|
||||
|
||||
if (bounced) {
|
||||
ball.setVelocity(vel);
|
||||
@@ -196,20 +238,29 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
}
|
||||
|
||||
private void handleParticles(double speed) {
|
||||
if (speed < 0.05) return;
|
||||
if (speed < PARTICLE_SPEED_MIN) return;
|
||||
|
||||
Location loc = ball.getLocation().add(0, 0.2, 0);
|
||||
World world = loc.getWorld();
|
||||
if (world == null) return;
|
||||
|
||||
if (speed > 0.85) world.spawnParticle(Particle.SONIC_BOOM, loc, 1, 0, 0, 0, 0);
|
||||
else if (speed > 0.45) world.spawnParticle(Particle.CRIT, loc, 3, 0.1, 0.1, 0.1, 0.08);
|
||||
else world.spawnParticle(Particle.SMOKE, loc, 1, 0.05, 0, 0.05, 0.02);
|
||||
if (speed > PARTICLE_SPEED_HIGH) {
|
||||
world.spawnParticle(Particle.SONIC_BOOM, loc, 1, 0, 0, 0, 0);
|
||||
} else if (speed > PARTICLE_SPEED_MEDIUM) {
|
||||
world.spawnParticle(Particle.CRIT, loc, 3, 0.1, 0.1, 0.1, 0.08);
|
||||
} else {
|
||||
world.spawnParticle(Particle.SMOKE, loc, 1, 0.05, 0, 0.05, 0.02);
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnBall() {
|
||||
if (spawnLocation == null || (ball != null && ball.isValid())) return;
|
||||
if (spawnLocation == null || spawnLocation.getWorld() == null) {
|
||||
// Keine Warnung mehr in der Konsole ausgeben
|
||||
return;
|
||||
}
|
||||
|
||||
if (ball != null && ball.isValid()) return;
|
||||
|
||||
// Ball direkt auf dem Boden spawnen (keine Y-Offset Erhöhung)
|
||||
Location spawnLoc = spawnLocation.clone();
|
||||
ball = (ArmorStand) spawnLoc.getWorld().spawnEntity(spawnLoc, EntityType.ARMOR_STAND);
|
||||
|
||||
@@ -220,17 +271,15 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
ball.setInvulnerable(false);
|
||||
ball.setArms(false);
|
||||
ball.setCustomNameVisible(false);
|
||||
|
||||
// Setze Custom Name für zusätzliche Erkennung (unsichtbar für Spieler)
|
||||
ball.setCustomName(BALL_NAME);
|
||||
|
||||
// Deaktiviert das Speichern in der Welt-Datei
|
||||
ball.setPersistent(false);
|
||||
// Markiert den Ball für das Cleanup-System
|
||||
ball.setPersistent(false);
|
||||
ball.addScoreboardTag(BALL_TAG);
|
||||
|
||||
ItemStack ballHead = getSoccerHead();
|
||||
if (ball.getEquipment() != null) ball.getEquipment().setHelmet(ballHead);
|
||||
if (ball.getEquipment() != null) {
|
||||
ball.getEquipment().setHelmet(ballHead);
|
||||
}
|
||||
|
||||
lastMoveTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@@ -239,35 +288,37 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
SkullMeta meta = (SkullMeta) head.getItemMeta();
|
||||
if (meta == null) return head;
|
||||
|
||||
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID(), "SoccerBall");
|
||||
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID(), BALL_NAME);
|
||||
try {
|
||||
profile.getTextures().setSkin(new URL(TEXTURE_URL));
|
||||
} catch (MalformedURLException ignored) {}
|
||||
} catch (MalformedURLException e) {
|
||||
Bukkit.getLogger().warning("[NexusLobby] Ungültige Ball-Textur URL!");
|
||||
}
|
||||
meta.setOwnerProfile(profile);
|
||||
|
||||
head.setItemMeta(meta);
|
||||
return head;
|
||||
}
|
||||
|
||||
public void respawnBall() {
|
||||
if (ball != null) {
|
||||
if (ball != null && ball.isValid()) {
|
||||
ball.remove();
|
||||
ball = null;
|
||||
}
|
||||
removeAllOldBallsGlobal();
|
||||
removeAllOldBalls();
|
||||
spawnBall();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBallPunch(EntityDamageByEntityEvent event) {
|
||||
if (event.getEntity().equals(ball)) {
|
||||
event.setCancelled(true);
|
||||
if (event.getDamager() instanceof Player p) {
|
||||
Vector shootDir = p.getLocation().getDirection();
|
||||
if (shootDir.lengthSquared() > 0) {
|
||||
shootDir.normalize().multiply(1.35).setY(0.38);
|
||||
ball.setVelocity(shootDir);
|
||||
}
|
||||
if (ball == null || !event.getEntity().equals(ball)) return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (event.getDamager() instanceof Player p) {
|
||||
Vector shootDir = p.getLocation().getDirection();
|
||||
if (shootDir.lengthSquared() > 0) {
|
||||
shootDir.normalize().multiply(KICK_FORCE).setY(KICK_LIFT);
|
||||
ball.setVelocity(shootDir);
|
||||
ball.getWorld().playSound(ball.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 0.6f, 1.5f);
|
||||
lastMoveTime = System.currentTimeMillis();
|
||||
}
|
||||
@@ -276,30 +327,61 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
@EventHandler
|
||||
public void onBallInteract(PlayerInteractAtEntityEvent event) {
|
||||
if (event.getRightClicked().equals(ball)) event.setCancelled(true);
|
||||
if (ball != null && event.getRightClicked().equals(ball)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadConfigLocation() {
|
||||
FileConfiguration config = NexusLobby.getInstance().getConfig();
|
||||
if (config.contains("ball.spawn")) spawnLocation = config.getLocation("ball.spawn");
|
||||
if (config.contains("ball.spawn")) {
|
||||
spawnLocation = config.getLocation("ball.spawn");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player p) || !p.hasPermission("nexuslobby.admin")) return true;
|
||||
if (!(sender instanceof Player p)) {
|
||||
sender.sendMessage("§cNur Spieler können diesen Befehl ausführen.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!p.hasPermission("nexuslobby.admin")) {
|
||||
p.sendMessage("§cKeine Berechtigung!");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length >= 2 && args[0].equalsIgnoreCase("ball")) {
|
||||
if (args[1].equalsIgnoreCase("setspawn")) {
|
||||
spawnLocation = p.getLocation();
|
||||
NexusLobby.getInstance().getConfig().set("ball.spawn", spawnLocation);
|
||||
NexusLobby.getInstance().saveConfig();
|
||||
respawnBall();
|
||||
p.sendMessage("§8[§6Nexus§8] §aBall-Spawn gesetzt. Cleanup ist aktiv!");
|
||||
return true;
|
||||
} else if (args[1].equalsIgnoreCase("respawn")) {
|
||||
respawnBall();
|
||||
p.sendMessage("§8[§6Nexus§8] §eBall manuell respawnt.");
|
||||
return true;
|
||||
switch (args[1].toLowerCase()) {
|
||||
case "setspawn" -> {
|
||||
spawnLocation = p.getLocation();
|
||||
NexusLobby.getInstance().getConfig().set("ball.spawn", spawnLocation);
|
||||
NexusLobby.getInstance().saveConfig();
|
||||
respawnBall();
|
||||
p.sendMessage("§8[§6Nexus§8] §aBall-Spawn gesetzt und Ball respawnt!");
|
||||
return true;
|
||||
}
|
||||
case "respawn" -> {
|
||||
respawnBall();
|
||||
p.sendMessage("§8[§6Nexus§8] §eBall manuell respawnt.");
|
||||
return true;
|
||||
}
|
||||
case "remove" -> {
|
||||
if (ball != null) {
|
||||
ball.remove();
|
||||
ball = null;
|
||||
}
|
||||
removeAllOldBalls();
|
||||
p.sendMessage("§8[§6Nexus§8] §cBall entfernt und Cleanup durchgeführt.");
|
||||
return true;
|
||||
}
|
||||
default -> {
|
||||
p.sendMessage("§8[§6Nexus§8] §7Verwendung:");
|
||||
p.sendMessage("§e/nexuslobby ball setspawn §7- Setzt den Ball-Spawn");
|
||||
p.sendMessage("§e/nexuslobby ball respawn §7- Spawnt den Ball neu");
|
||||
p.sendMessage("§e/nexuslobby ball remove §7- Entfernt den Ball");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -307,6 +389,9 @@ public class SoccerModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (ball != null) ball.remove();
|
||||
if (ball != null && ball.isValid()) {
|
||||
ball.remove();
|
||||
ball = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class GadgetModule implements Module, Listener {
|
||||
@EventHandler
|
||||
public void onInteract(PlayerInteractEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if (item == null || !item.hasItemMeta()) return;
|
||||
if (item == null || !item.hasItemMeta() || !item.getItemMeta().hasDisplayName()) return;
|
||||
String name = item.getItemMeta().getDisplayName();
|
||||
|
||||
if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
@@ -216,7 +216,11 @@ public class GadgetModule implements Module, Listener {
|
||||
else if (item.getType() == Material.BARRIER) { removeGadgets(player); player.closeInventory(); }
|
||||
} else if (title.equals(HAT_TITLE)) {
|
||||
if (item.getType() != Material.GRAY_STAINED_GLASS_PANE) {
|
||||
HatManager.setHat(player, item.getType(), item.getItemMeta().getDisplayName());
|
||||
String hatName = item.getType().name();
|
||||
if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()) {
|
||||
hatName = item.getItemMeta().getDisplayName();
|
||||
}
|
||||
HatManager.setHat(player, item.getType(), hatName);
|
||||
player.playSound(player.getLocation(), Sound.ITEM_ARMOR_EQUIP_GENERIC, 1, 1);
|
||||
player.closeInventory();
|
||||
}
|
||||
@@ -273,7 +277,8 @@ public class GadgetModule implements Module, Listener {
|
||||
public void onFish(PlayerFishEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
ItemStack item = player.getInventory().getItemInMainHand();
|
||||
if (item.getType() == Material.FISHING_ROD && item.hasItemMeta() && item.getItemMeta().getDisplayName().equals("§b§lEnterhaken")) {
|
||||
if (item.getType() == Material.FISHING_ROD && item.hasItemMeta() && item.getItemMeta().hasDisplayName()
|
||||
&& item.getItemMeta().getDisplayName().equals("§b§lEnterhaken")) {
|
||||
if (event.getState() == PlayerFishEvent.State.IN_GROUND || event.getState() == PlayerFishEvent.State.REEL_IN || event.getState() == PlayerFishEvent.State.CAUGHT_ENTITY) {
|
||||
if (event.getHook() != null) {
|
||||
GrapplingHook.pullPlayer(player, event.getHook().getLocation());
|
||||
|
||||
@@ -158,7 +158,7 @@ public class HologramModule implements Module, Listener {
|
||||
config.save(file);
|
||||
} catch (IOException e) {
|
||||
NexusLobby.getInstance().getLogger().severe("Konnte holograms.yml nicht speichern!");
|
||||
e.printStackTrace();
|
||||
NexusLobby.getInstance().getLogger().severe("Fehler beim Speichern der Hologramme: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,11 @@ public class IntroModule implements Module, Listener, CommandExecutor {
|
||||
|
||||
private void savePoints() {
|
||||
config.set("points", points);
|
||||
try { config.save(configFile); } catch (IOException e) { e.printStackTrace(); }
|
||||
try {
|
||||
config.save(configFile);
|
||||
} catch (IOException e) {
|
||||
NexusLobby.getInstance().getLogger().severe("Fehler beim Speichern der Intro-Config: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MapArtModule implements Module, CommandExecutor {
|
||||
try {
|
||||
storageFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
NexusLobby.getInstance().getLogger().severe("Fehler beim Erstellen der mapart.yml: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
storageConfig = YamlConfiguration.loadConfiguration(storageFile);
|
||||
@@ -77,7 +77,7 @@ public class MapArtModule implements Module, CommandExecutor {
|
||||
try {
|
||||
storageConfig.save(storageFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
NexusLobby.getInstance().getLogger().severe("Fehler beim Speichern der mapart.yml: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,11 @@ public class ParkourManager {
|
||||
private void loadConfig() {
|
||||
if (!file.exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); }
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().severe("Fehler beim Erstellen der Parkour-Datei: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
config = YamlConfiguration.loadConfiguration(file);
|
||||
}
|
||||
@@ -183,7 +187,13 @@ public class ParkourManager {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private void save() { try { config.save(file); } catch (IOException e) { e.printStackTrace(); } }
|
||||
private void save() {
|
||||
try {
|
||||
config.save(file);
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().severe("Fehler beim Speichern der Parkour-Config: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void clearStats() {
|
||||
config.set("besttimes", null);
|
||||
|
||||
@@ -94,9 +94,15 @@ public class PlayerInspectModule implements Module, Listener {
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§8§m-----------------------");
|
||||
|
||||
// LuckPerms Prefix über PlaceholderAPI auslesen
|
||||
// LuckPerms Prefix über PlaceholderAPI auslesen (falls vorhanden)
|
||||
String prefix = "%luckperms_prefix%";
|
||||
prefix = PlaceholderAPI.setPlaceholders(target, prefix);
|
||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
try {
|
||||
prefix = PlaceholderAPI.setPlaceholders(target, prefix);
|
||||
} catch (NoClassDefFoundError ignored) {
|
||||
// PlaceholderAPI fehlt zur Laufzeit
|
||||
}
|
||||
}
|
||||
|
||||
// KORREKTUR: Farbcodes (&) in echte Minecraft-Farben (§) umwandeln
|
||||
prefix = ChatColor.translateAlternateColorCodes('&', prefix);
|
||||
|
||||
@@ -46,6 +46,7 @@ public class PortalManager implements Module, Listener {
|
||||
private Location borderMin;
|
||||
private Location borderMax;
|
||||
private boolean borderEnabled = false;
|
||||
private String borderType;
|
||||
|
||||
public PortalManager(NexusLobby plugin) {
|
||||
this.plugin = plugin;
|
||||
@@ -63,7 +64,6 @@ public class PortalManager implements Module, Listener {
|
||||
loadBorderSettings();
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
startParticleTask();
|
||||
plugin.getLogger().info("PortalManager vollständig geladen.");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,17 +77,25 @@ public class PortalManager implements Module, Listener {
|
||||
}
|
||||
|
||||
public void loadBorderSettings() {
|
||||
if (plugin.getConfig().contains("border.pos1") && plugin.getConfig().contains("border.pos2")) {
|
||||
Location p1 = plugin.getConfig().getLocation("border.pos1");
|
||||
Location p2 = plugin.getConfig().getLocation("border.pos2");
|
||||
this.borderType = plugin.getConfig().getString("worldborder.type", "SQUARE");
|
||||
boolean enabled = plugin.getConfig().getBoolean("worldborder.enabled", false);
|
||||
if (!enabled || !"SQUARE".equalsIgnoreCase(borderType)) {
|
||||
this.borderEnabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getConfig().contains("worldborder.pos1") && plugin.getConfig().contains("worldborder.pos2")) {
|
||||
Location p1 = plugin.getConfig().getLocation("worldborder.pos1");
|
||||
Location p2 = plugin.getConfig().getLocation("worldborder.pos2");
|
||||
if (p1 != null && p2 != null) {
|
||||
this.borderMin = getMinLocation(p1, p2);
|
||||
this.borderMax = getMaxLocation(p1, p2);
|
||||
this.borderEnabled = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.borderEnabled = false;
|
||||
}
|
||||
|
||||
this.borderEnabled = false;
|
||||
}
|
||||
|
||||
public Set<String> getPortalNames() {
|
||||
@@ -221,8 +229,7 @@ public class PortalManager implements Module, Listener {
|
||||
try {
|
||||
config.save(new java.io.File(plugin.getDataFolder(), "portals.yml"));
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().severe("Konnte portals.yml nicht speichern!");
|
||||
e.printStackTrace();
|
||||
plugin.getLogger().severe("Fehler beim Speichern der portals.yml: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +409,7 @@ public class PortalManager implements Module, Listener {
|
||||
out.writeUTF(serverName);
|
||||
player.sendPluginMessage(plugin, "BungeeCord", b.toByteArray());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
plugin.getLogger().warning("Fehler beim Senden der BungeeCord-Nachricht: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
@@ -13,6 +14,8 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ServerChecker {
|
||||
|
||||
private static BukkitTask globalCheckerTask = null;
|
||||
|
||||
/**
|
||||
* Prüft asynchron, ob ein Server unter der angegebenen IP und Port erreichbar ist.
|
||||
*/
|
||||
@@ -32,8 +35,11 @@ public class ServerChecker {
|
||||
* Startet den Scheduler, der alle ArmorStands in allen Welten regelmäßig prüft.
|
||||
*/
|
||||
public static void startGlobalChecker() {
|
||||
// Cancel alten Task falls vorhanden
|
||||
stopGlobalChecker();
|
||||
|
||||
// WICHTIG: runTaskTimer (synchron), um den Main-Thread für getEntitiesByClass zu nutzen
|
||||
Bukkit.getScheduler().runTaskTimer(NexusLobby.getInstance(), () -> {
|
||||
globalCheckerTask = Bukkit.getScheduler().runTaskTimer(NexusLobby.getInstance(), () -> {
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
// Das Abrufen der Entities muss auf dem Main-Thread passieren
|
||||
for (ArmorStand as : world.getEntitiesByClass(ArmorStand.class)) {
|
||||
@@ -43,6 +49,16 @@ public class ServerChecker {
|
||||
}, 100L, 200L);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stoppt den Server-Checker Task
|
||||
*/
|
||||
public static void stopGlobalChecker() {
|
||||
if (globalCheckerTask != null && !globalCheckerTask.isCancelled()) {
|
||||
globalCheckerTask.cancel();
|
||||
globalCheckerTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Analysiert die Tags eines ArmorStands und aktualisiert den Namen basierend auf dem Serverstatus.
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ServerSwitcherGUI {
|
||||
private static void connectToServer(Player player, String serverName, Plugin plugin) {
|
||||
try {
|
||||
if (!Bukkit.getMessenger().isOutgoingChannelRegistered(plugin, "BungeeCord")) {
|
||||
player.sendMessage(ChatColor.RED + "Proxy-Verbindung nicht möglich (BungeeCord Kanal nicht registriert).");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("proxy_not_registered"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -120,13 +120,13 @@ public class ServerSwitcherGUI {
|
||||
out.writeUTF("Connect");
|
||||
out.writeUTF(serverName);
|
||||
player.sendPluginMessage(plugin, "BungeeCord", b.toByteArray());
|
||||
player.sendMessage(ChatColor.YELLOW + "Verbinde zu: " + ChatColor.WHITE + serverName);
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("connecting_to_server").replace("{server}", serverName));
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
player.sendMessage(ChatColor.RED + "Fehler beim Verbinden zum Server.");
|
||||
NexusLobby.getInstance().getLogger().warning("Fehler beim Senden der BungeeCord-Nachricht: " + ex.getMessage());
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("server_connect_error"));
|
||||
} catch (RuntimeException ex) {
|
||||
// Schutz gegen unerwartete RuntimeExceptions bei plugin messaging
|
||||
player.sendMessage(ChatColor.RED + "Proxy-Verbindung nicht möglich.");
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("proxy_connect_error"));
|
||||
plugin.getLogger().warning("Fehler beim Senden der Plugin-Message: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import de.nexuslobby.NexusLobby;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -19,7 +22,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ServerSwitcherListener implements Listener {
|
||||
public class ServerSwitcherListener implements Listener, CommandExecutor {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent e) {
|
||||
@@ -51,6 +54,23 @@ public class ServerSwitcherListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage(de.nexuslobby.utils.LangManager.get("only_player"));
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
if (!player.hasPermission("nexuslobby.serverswitcher")) {
|
||||
player.sendMessage(de.nexuslobby.utils.LangManager.get("no_permission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
openServerGUI(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onCompassClick(PlayerInteractEvent e) {
|
||||
Player p = e.getPlayer();
|
||||
|
||||
@@ -61,6 +61,7 @@ public class LobbySettingsModule implements Module, Listener {
|
||||
}
|
||||
|
||||
// Hilfsmethode zur sicheren Anwendung von GameRules in 1.21
|
||||
@SuppressWarnings("unchecked")
|
||||
private void updateGameRule(World world, String ruleName, Object value) {
|
||||
GameRule<?> rule = GameRule.getByName(ruleName);
|
||||
if (rule == null) return;
|
||||
@@ -117,6 +118,7 @@ public class LobbySettingsModule implements Module, Listener {
|
||||
Material mat = isBool ? ((Boolean)value ? Material.LIME_DYE : Material.GRAY_DYE) : Material.BOOK;
|
||||
ItemStack item = new ItemStack(mat);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return item;
|
||||
meta.setDisplayName("§e" + key);
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§7Aktueller Wert: §f" + value);
|
||||
@@ -160,13 +162,17 @@ public class LobbySettingsModule implements Module, Listener {
|
||||
|
||||
private void handleSubClick(InventoryClickEvent event) {
|
||||
Player p = (Player) event.getWhoClicked();
|
||||
if (event.getCurrentItem() == null || event.getCurrentItem().getType() == Material.AIR) return;
|
||||
if (event.getCurrentItem().getType() == Material.BARRIER) {
|
||||
ItemStack current = event.getCurrentItem();
|
||||
if (current == null || current.getType() == Material.AIR) return;
|
||||
if (current.getType() == Material.BARRIER) {
|
||||
openMainMenu(p);
|
||||
return;
|
||||
}
|
||||
|
||||
String key = event.getCurrentItem().getItemMeta().getDisplayName().substring(2);
|
||||
ItemMeta meta = current.getItemMeta();
|
||||
if (meta == null || !meta.hasDisplayName()) return;
|
||||
String displayName = meta.getDisplayName();
|
||||
if (displayName.length() < 3) return;
|
||||
String key = displayName.substring(2);
|
||||
String path = settingsConfig.contains("gamerules." + key) ? "gamerules." + key : key;
|
||||
Object value = settingsConfig.get(path);
|
||||
String category = event.getView().getTitle().replace(subTitlePrefix, "");
|
||||
@@ -203,12 +209,17 @@ public class LobbySettingsModule implements Module, Listener {
|
||||
}
|
||||
|
||||
private void saveSettings() {
|
||||
try { settingsConfig.save(configFile); } catch (IOException e) { e.printStackTrace(); }
|
||||
try {
|
||||
settingsConfig.save(configFile);
|
||||
} catch (IOException e) {
|
||||
NexusLobby.getInstance().getLogger().severe("Fehler beim Speichern der settings.yml: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private ItemStack createItem(Material mat, String name, String lore) {
|
||||
ItemStack item = new ItemStack(mat);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return item;
|
||||
meta.setDisplayName(name);
|
||||
if (!lore.isEmpty()) {
|
||||
List<String> lores = new ArrayList<>();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class GlobalChatSuppressor implements Module, PluginMessageListener, List
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Bukkit.getLogger().severe("Fehler beim Abrufen des Conversation-Managers: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package de.nexuslobby.utils;
|
||||
|
||||
import de.nexuslobby.NexusLobby;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -23,7 +24,13 @@ public class ConfigUpdater {
|
||||
FileConfiguration serverConfig = YamlConfiguration.loadConfiguration(configFile);
|
||||
List<String> newFileContent = new ArrayList<>();
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(plugin.getResource(fileName), StandardCharsets.UTF_8))) {
|
||||
InputStream resourceStream = plugin.getResource(fileName);
|
||||
if (resourceStream == null) {
|
||||
plugin.getLogger().severe("Config-Update fehlgeschlagen: Resource fehlt: " + fileName);
|
||||
return;
|
||||
}
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(resourceStream, StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
String trimmed = line.trim();
|
||||
@@ -52,7 +59,7 @@ public class ConfigUpdater {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Bukkit.getLogger().severe("Fehler beim Config-Update: " + e.getMessage());
|
||||
}
|
||||
|
||||
// 3. Datei sauber speichern
|
||||
|
||||
155
src/main/java/de/nexuslobby/utils/ConfigValidator.java
Normal file
155
src/main/java/de/nexuslobby/utils/ConfigValidator.java
Normal file
@@ -0,0 +1,155 @@
|
||||
package de.nexuslobby.utils;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Validiert Config-Werte und setzt Default-Werte wenn nötig
|
||||
*/
|
||||
public class ConfigValidator {
|
||||
|
||||
private final JavaPlugin plugin;
|
||||
private final FileConfiguration config;
|
||||
private final List<String> warnings = new ArrayList<>();
|
||||
private boolean modified = false;
|
||||
|
||||
public ConfigValidator(JavaPlugin plugin, FileConfiguration config) {
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validiert alle Config-Werte und gibt Warnings aus
|
||||
*/
|
||||
public void validate() {
|
||||
validateSpawn();
|
||||
validateLobbySettings();
|
||||
validateTablist();
|
||||
validateBall();
|
||||
validateModules();
|
||||
|
||||
// Warnings ausgeben
|
||||
if (!warnings.isEmpty()) {
|
||||
plugin.getLogger().warning("=== Config-Validierung ===");
|
||||
warnings.forEach(msg -> plugin.getLogger().warning(" " + msg));
|
||||
plugin.getLogger().warning("=========================");
|
||||
}
|
||||
|
||||
// Config speichern wenn Änderungen vorgenommen wurden
|
||||
if (modified) {
|
||||
plugin.saveConfig();
|
||||
plugin.getLogger().info("Config wurde mit Default-Werten aktualisiert.");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSpawn() {
|
||||
ensureDefault("spawn.world", "world");
|
||||
ensureDefault("spawn.x", 0.5);
|
||||
ensureDefault("spawn.y", 64.0);
|
||||
ensureDefault("spawn.z", 0.5);
|
||||
ensureDefault("spawn.yaw", 0.0);
|
||||
ensureDefault("spawn.pitch", 0.0);
|
||||
|
||||
// Validiere Y-Koordinate
|
||||
double y = config.getDouble("spawn.y", 64.0);
|
||||
if (y < -64 || y > 320) {
|
||||
warnings.add("spawn.y (" + y + ") außerhalb des gültigen Bereichs (-64 bis 320)");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateLobbySettings() {
|
||||
ensureDefault("lobby.allow-fly", false);
|
||||
ensureDefault("lobby.pvp-enabled", false);
|
||||
ensureDefault("lobby.build-enabled", false);
|
||||
ensureDefault("lobby.default-gamemode", "Adventure");
|
||||
ensureDefault("lobby.clear-inventory-on-join", true);
|
||||
|
||||
// Validiere GameMode
|
||||
String gamemode = config.getString("lobby.default-gamemode", "Adventure");
|
||||
if (!isValidGameMode(gamemode)) {
|
||||
warnings.add("lobby.default-gamemode '" + gamemode + "' ist ungültig. Nutze: Survival, Creative, Adventure oder Spectator");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateTablist() {
|
||||
ensureDefault("tablist.enabled", true);
|
||||
ensureDefault("tablist.header", "&6Willkommen auf &eNexusLobby");
|
||||
ensureDefault("tablist.footer", "&7Viel Spaß!");
|
||||
ensureDefault("tablist.refresh-interval", 40);
|
||||
|
||||
// Validiere Refresh-Interval
|
||||
int interval = config.getInt("tablist.refresh-interval", 40);
|
||||
if (interval < 1) {
|
||||
warnings.add("tablist.refresh-interval (" + interval + ") ist zu klein. Minimum ist 1 Tick.");
|
||||
config.set("tablist.refresh-interval", 1);
|
||||
modified = true;
|
||||
} else if (interval > 200) {
|
||||
warnings.add("tablist.refresh-interval (" + interval + ") ist sehr hoch. Empfohlen: 20-100 Ticks.");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBall() {
|
||||
ensureDefault("ball.respawn_delay", 60);
|
||||
|
||||
// Validiere Respawn-Delay
|
||||
long delay = config.getLong("ball.respawn_delay", 60);
|
||||
if (delay < 5) {
|
||||
warnings.add("ball.respawn_delay (" + delay + "s) ist zu kurz. Minimum empfohlen: 5 Sekunden.");
|
||||
} else if (delay > 600) {
|
||||
warnings.add("ball.respawn_delay (" + delay + "s) ist sehr lang. Empfohlen: 30-120 Sekunden.");
|
||||
}
|
||||
|
||||
// Prüfe ob Spawn gesetzt ist
|
||||
if (!config.contains("ball.spawn")) {
|
||||
warnings.add("ball.spawn nicht gesetzt. Nutze /nexuslobby ball setspawn");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateModules() {
|
||||
// Worldborder
|
||||
if (config.contains("worldborder.enabled")) {
|
||||
ensureDefault("worldborder.type", "SQUARE");
|
||||
ensureDefault("worldborder.radius", 50.0);
|
||||
|
||||
double radius = config.getDouble("worldborder.radius", 50.0);
|
||||
if (radius < 10) {
|
||||
warnings.add("worldborder.radius (" + radius + ") ist sehr klein. Minimum empfohlen: 10 Blöcke.");
|
||||
} else if (radius > 10000) {
|
||||
warnings.add("worldborder.radius (" + radius + ") ist extrem groß. Performance-Warnung!");
|
||||
}
|
||||
|
||||
String type = config.getString("worldborder.type", "SQUARE");
|
||||
if (!type.equalsIgnoreCase("SQUARE") && !type.equalsIgnoreCase("CIRCLE")) {
|
||||
warnings.add("worldborder.type '" + type + "' ist ungültig. Nutze: SQUARE oder CIRCLE");
|
||||
}
|
||||
}
|
||||
|
||||
// Items Modul
|
||||
if (config.contains("items.lobby-tools")) {
|
||||
// Prüfe ob Slot-Nummern gültig sind (0-8)
|
||||
for (String toolKey : config.getConfigurationSection("items.lobby-tools").getKeys(false)) {
|
||||
int slot = config.getInt("items.lobby-tools." + toolKey + ".slot", -1);
|
||||
if (slot < 0 || slot > 8) {
|
||||
warnings.add("items.lobby-tools." + toolKey + ".slot (" + slot + ") ist ungültig (0-8)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureDefault(String path, Object defaultValue) {
|
||||
if (!config.contains(path)) {
|
||||
config.set(path, defaultValue);
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isValidGameMode(String mode) {
|
||||
return mode.equalsIgnoreCase("Survival") ||
|
||||
mode.equalsIgnoreCase("Creative") ||
|
||||
mode.equalsIgnoreCase("Adventure") ||
|
||||
mode.equalsIgnoreCase("Spectator");
|
||||
}
|
||||
}
|
||||
32
src/main/java/de/nexuslobby/utils/LangManager.java
Normal file
32
src/main/java/de/nexuslobby/utils/LangManager.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package de.nexuslobby.utils;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
|
||||
public class LangManager {
|
||||
private static Map<String, Map<String, String>> langMap;
|
||||
private static String currentLang = "de";
|
||||
|
||||
public static void load(JavaPlugin plugin) {
|
||||
Yaml yaml = new Yaml();
|
||||
try (InputStream in = plugin.getResource("lang.yml")) {
|
||||
langMap = yaml.load(in);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void setLanguage(String lang) {
|
||||
currentLang = lang;
|
||||
}
|
||||
|
||||
public static String get(String key) {
|
||||
if (langMap == null) return key;
|
||||
Map<String, String> translations = langMap.get(key);
|
||||
if (translations == null) return key;
|
||||
return translations.getOrDefault(currentLang, key);
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,23 @@ public class PlayerHider implements Listener {
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
if (!NexusLobby.getInstance().getConfig().getBoolean("hider.enabled", true)) return;
|
||||
|
||||
Material material = Material.valueOf(NexusLobby.getInstance().getConfig().getString("hider.item", "REDSTONE"));
|
||||
int slot = NexusLobby.getInstance().getConfig().getInt("hider.slot", 8);
|
||||
|
||||
var config = NexusLobby.getInstance().getConfig();
|
||||
Material material;
|
||||
try {
|
||||
material = Material.valueOf(config.getString("hider.item", "REDSTONE"));
|
||||
} catch (IllegalArgumentException e) {
|
||||
material = Material.REDSTONE;
|
||||
}
|
||||
int slot = config.getInt("hider.slot", 8);
|
||||
|
||||
ItemStack item = new ItemStack(material);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(NexusLobby.getInstance().getConfig().getString("hider.messages.all").replace("&", "§"));
|
||||
item.setItemMeta(meta);
|
||||
if (meta != null) {
|
||||
String allMsg = colorize(config.getString("hider.messages.all", "&aAlle Spieler"));
|
||||
meta.setDisplayName(allMsg);
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
|
||||
event.getPlayer().getInventory().setItem(slot, item);
|
||||
}
|
||||
@@ -39,32 +48,40 @@ public class PlayerHider implements Listener {
|
||||
public void onInteract(PlayerInteractEvent event) {
|
||||
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
|
||||
if (event.getItem() == null) return;
|
||||
if (!event.getItem().hasItemMeta()) return;
|
||||
if (event.getItem().getItemMeta() == null) return;
|
||||
if (!event.getItem().getItemMeta().hasDisplayName()) return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
String allMsg = NexusLobby.getInstance().getConfig().getString("hider.messages.all").replace("&", "§");
|
||||
String noneMsg = NexusLobby.getInstance().getConfig().getString("hider.messages.none").replace("&", "§");
|
||||
var config = NexusLobby.getInstance().getConfig();
|
||||
String allMsg = de.nexuslobby.utils.LangManager.get("hider_all");
|
||||
String noneMsg = de.nexuslobby.utils.LangManager.get("hider_none");
|
||||
|
||||
if (event.getItem().getItemMeta().getDisplayName().equals(allMsg)) {
|
||||
// Verstecken
|
||||
hidden.add(player.getUniqueId());
|
||||
for (Player target : Bukkit.getOnlinePlayers()) player.hidePlayer(NexusLobby.getInstance(), target);
|
||||
|
||||
updateItem(player, noneMsg);
|
||||
player.sendMessage(noneMsg);
|
||||
} else if (event.getItem().getItemMeta().getDisplayName().equals(noneMsg)) {
|
||||
// Zeigen
|
||||
hidden.remove(player.getUniqueId());
|
||||
for (Player target : Bukkit.getOnlinePlayers()) player.showPlayer(NexusLobby.getInstance(), target);
|
||||
|
||||
updateItem(player, allMsg);
|
||||
player.sendMessage(allMsg);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateItem(Player player, String name) {
|
||||
ItemStack item = player.getInventory().getItemInHand();
|
||||
ItemStack item = player.getInventory().getItemInMainHand();
|
||||
if (item == null || !item.hasItemMeta()) return;
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null) return;
|
||||
meta.setDisplayName(name);
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
|
||||
private String colorize(String s) {
|
||||
return s == null ? "" : s.replace("&", "§");
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,24 @@
|
||||
package de.nexuslobby.utils;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import de.nexuslobby.NexusLobby;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Scanner;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class UpdateChecker {
|
||||
|
||||
private final NexusLobby plugin;
|
||||
// URL zur Gitea API für das neueste Release
|
||||
private final String url = "https://git.viper.ipv64.net/api/v1/repos/M_Viper/NexusLobby/releases/latest";
|
||||
private static final String API_URL = "https://git.viper.ipv64.net/api/v1/repos/M_Viper/NexusLobby/releases/latest";
|
||||
private static final int TIMEOUT_MS = 5000;
|
||||
|
||||
public UpdateChecker(NexusLobby plugin) {
|
||||
this.plugin = plugin;
|
||||
@@ -20,23 +26,60 @@ public class UpdateChecker {
|
||||
|
||||
public void getVersion(final Consumer<String> consumer) {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
||||
try (InputStream inputStream = new URL(url).openStream(); Scanner scanner = new Scanner(inputStream)) {
|
||||
StringBuilder response = new StringBuilder();
|
||||
while (scanner.hasNextLine()) {
|
||||
response.append(scanner.nextLine());
|
||||
HttpURLConnection connection = null;
|
||||
try {
|
||||
URL url = new URL(API_URL);
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setConnectTimeout(TIMEOUT_MS);
|
||||
connection.setReadTimeout(TIMEOUT_MS);
|
||||
connection.setRequestProperty("Accept", "application/json");
|
||||
connection.setRequestProperty("User-Agent", "NexusLobby-UpdateChecker");
|
||||
|
||||
int responseCode = connection.getResponseCode();
|
||||
if (responseCode != HttpURLConnection.HTTP_OK) {
|
||||
plugin.getLogger().warning("Update-Check fehlgeschlagen: HTTP " + responseCode);
|
||||
return;
|
||||
}
|
||||
|
||||
String content = response.toString();
|
||||
// Einfaches Parsing des JSON "tag_name" Feldes
|
||||
if (content.contains("\"tag_name\":")) {
|
||||
String version = content.split("\"tag_name\":\"")[1].split("\"")[0];
|
||||
// Entferne ein eventuelles 'v' Präfix (z.B. v1.0.0 -> 1.0.0)
|
||||
version = version.replace("v", "");
|
||||
consumer.accept(version);
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(
|
||||
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
|
||||
|
||||
StringBuilder response = new StringBuilder();
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
response.append(line);
|
||||
}
|
||||
|
||||
parseAndNotify(response.toString(), consumer);
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().warning("Update-Check fehlgeschlagen: " + e.getMessage());
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
}
|
||||
} catch (IOException exception) {
|
||||
this.plugin.getLogger().warning("Update-Check fehlgeschlagen: " + exception.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void parseAndNotify(String jsonResponse, Consumer<String> consumer) {
|
||||
try {
|
||||
JsonObject json = JsonParser.parseString(jsonResponse).getAsJsonObject();
|
||||
|
||||
if (json.has("tag_name")) {
|
||||
String version = json.get("tag_name").getAsString();
|
||||
// Entferne 'v' Präfix falls vorhanden (z.B. v1.0.0 -> 1.0.0)
|
||||
if (version.startsWith("v")) {
|
||||
version = version.substring(1);
|
||||
}
|
||||
consumer.accept(version);
|
||||
} else {
|
||||
plugin.getLogger().warning("Update-Check: 'tag_name' nicht in API-Response gefunden");
|
||||
}
|
||||
} catch (JsonSyntaxException e) {
|
||||
plugin.getLogger().warning("Update-Check: Ungültiges JSON-Format - " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ public class VoidProtection implements Listener {
|
||||
if (NexusLobby.getInstance().getConfig().getBoolean("void_protection.teleport_to_spawn", true)) {
|
||||
Location spawn = player.getWorld().getSpawnLocation();
|
||||
player.teleport(spawn);
|
||||
String msg = NexusLobby.getInstance().getConfig().getString("void_protection.message");
|
||||
String msg = de.nexuslobby.utils.LangManager.get("void_protection_message");
|
||||
if (msg != null && !msg.isEmpty()) {
|
||||
player.sendMessage(msg.replace("&", "§"));
|
||||
player.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# -----------------------------------------------------
|
||||
# ArmorStandTools Configuration
|
||||
# -----------------------------
|
||||
# -----------------------------------------------------
|
||||
|
||||
# Nachrichten
|
||||
prefix: "§8[§6ArmorStand§8] §7"
|
||||
|
||||
@@ -1,86 +1,252 @@
|
||||
# ==========================
|
||||
# NexusLobby Konfiguration
|
||||
# ==========================
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# =============================================================
|
||||
# NEXUSLOBBY - HAUPTKONFIGURATION
|
||||
# =============================================================
|
||||
#
|
||||
# Diese Konfigurationsdatei steuert alle Aspekte deiner Lobby.
|
||||
# Farben werden mit & formatiert (z.B. &a = grün, &c = rot, &e = gelb)
|
||||
# Vollständige Farbcode-Liste: https://minecraft.fandom.com/wiki/Formatting_codes
|
||||
|
||||
# --- Spawn Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# SPRACHE
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Spracheinstellung für alle Texte und Nachrichten im Plugin
|
||||
# Verfügbare Optionen: de (Deutsch), en (Englisch), fr (Französisch)
|
||||
language: de
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# SPAWN EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Definiert den Spawn-Punkt der Lobby, zu dem Spieler beim Join teleportiert werden
|
||||
# Tipp: Nutze den Befehl /nexus setspawn um diese Werte automatisch zu setzen
|
||||
spawn:
|
||||
world: "world" # Name der Standardwelt
|
||||
x: 0.5 # X-Koordinate des Spawns
|
||||
y: 64.0 # Y-Koordinate des Spawns
|
||||
z: 0.5 # Z-Koordinate des Spawns
|
||||
yaw: 0.0 # Blickrichtung
|
||||
pitch: 0.0 # Blickrichtung
|
||||
# Name der Welt, in der sich der Spawn befindet
|
||||
world: "world"
|
||||
|
||||
# X-Koordinate des Spawn-Punktes (Ost-West)
|
||||
x: 0.5
|
||||
|
||||
# Y-Koordinate des Spawn-Punktes (Höhe)
|
||||
y: 64.0
|
||||
|
||||
# Z-Koordinate des Spawn-Punktes (Nord-Süd)
|
||||
z: 0.5
|
||||
|
||||
# Horizontale Blickrichtung beim Spawn (0-360 Grad)
|
||||
# 0 = Süden, 90 = Westen, 180 = Norden, 270 = Osten
|
||||
yaw: 0.0
|
||||
|
||||
# Vertikale Blickrichtung beim Spawn (-90 bis 90 Grad)
|
||||
# -90 = Direkt nach oben, 0 = Geradeaus, 90 = Direkt nach unten
|
||||
pitch: 0.0
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# WELTGRENZE (WORLD BORDER)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Erstellt eine unsichtbare Barriere um die Lobby herum
|
||||
worldborder:
|
||||
# Aktiviert die Weltgrenze (true = an, false = aus)
|
||||
enabled: true
|
||||
type: "SQUARE" # oder "CIRCLE"
|
||||
|
||||
# Form der Weltgrenze
|
||||
# Optionen: "SQUARE" (Quadrat), "CIRCLE" (Kreis)
|
||||
type: "SQUARE"
|
||||
|
||||
# Radius der Weltgrenze in Blöcken
|
||||
# Bei SQUARE: Kantenlänge = radius * 2
|
||||
# Bei CIRCLE: Durchmesser = radius * 2
|
||||
radius: 50.0
|
||||
|
||||
# Zentrum der Weltgrenze (optional, kann leer bleiben)
|
||||
# Wenn nicht gesetzt, wird der Spawn-Punkt als Zentrum verwendet
|
||||
center:
|
||||
|
||||
# Alternative: Definiere Eckpunkte (für rechteckige Border)
|
||||
# Format: x,y,z
|
||||
pos1:
|
||||
pos2:
|
||||
|
||||
# --- Lobby Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# LOBBY EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Grundlegende Verhaltensregeln und Einstellungen für die Lobby
|
||||
lobby:
|
||||
allow-fly: false # Spieler dürfen fliegen
|
||||
pvp-enabled: false # PvP in der Lobby
|
||||
build-enabled: false # Bau im Lobby-Bereich
|
||||
# Erlaubt Spielern das Fliegen in der Lobby
|
||||
# true = Spieler können fliegen, false = Fliegen ist deaktiviert
|
||||
allow-fly: false
|
||||
|
||||
# Aktiviert PvP (Player vs Player) in der Lobby
|
||||
# true = Spieler können sich gegenseitig angreifen, false = kein PvP
|
||||
pvp-enabled: false
|
||||
|
||||
# Erlaubt Spielern das Platzieren und Abbauen von Blöcken
|
||||
# true = Bauen erlaubt, false = Bauen verboten (außer für Berechtigte)
|
||||
build-enabled: false
|
||||
|
||||
# Standard-Spielmodus für alle Spieler in der Lobby
|
||||
# Optionen: Survival, Creative, Adventure, Spectator
|
||||
default-gamemode: Adventure
|
||||
|
||||
# Leert das Inventar von Spielern beim Betreten der Lobby
|
||||
# true = Inventar wird geleert, false = Inventar bleibt erhalten
|
||||
# Empfohlen: true für ein sauberes Lobby-Erlebnis
|
||||
clear-inventory-on-join: true
|
||||
|
||||
# Mapping für den Server-Status-Ping der ArmorStands
|
||||
# Der Name (z.B. survival) muss exakt dem Bungee-Servernamen entsprechen
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# SCOREBOARD EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Steuert das Scoreboard (rechte Seitenleiste) in der Lobby
|
||||
# Standardmäßig sichtbar? Spieler können es per Befehl ein-/ausblenden
|
||||
# true = Scoreboard wird beim Join angezeigt, false = standardmäßig ausgeblendet
|
||||
scoreboard-default-visible: true
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# SERVER-STATUS PING (FÜR ARMORSTANDS)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Mapping für den Server-Status-Ping der ArmorStands in der Lobby
|
||||
# Diese Einstellungen ermöglichen es, den Status anderer Server zu überprüfen
|
||||
# WICHTIG: Der Name (z.B. "survival") muss EXAKT dem BungeeCord-Servernamen entsprechen
|
||||
servers:
|
||||
# Erster Server: Survival
|
||||
survival:
|
||||
# IP-Adresse des Survival-Servers
|
||||
# 127.0.0.1 = Localhost (Server läuft auf derselben Maschine)
|
||||
ip: "127.0.0.1"
|
||||
|
||||
# Port des Survival-Servers
|
||||
port: 25566
|
||||
|
||||
# Zweiter Server: Skyblock
|
||||
skyblock:
|
||||
# IP-Adresse des Skyblock-Servers
|
||||
ip: "127.0.0.1"
|
||||
port: 25567
|
||||
|
||||
# Port des Skyblock-Servers
|
||||
port: 25567
|
||||
|
||||
# --- Tablist Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# TABLISTE (TAB-LISTE) EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Anpassung der Player-Liste (TAB-Taste)
|
||||
tablist:
|
||||
# Aktiviert die angepasste Tabliste
|
||||
# true = Custom Tablist wird verwendet, false = Standard Minecraft Tablist
|
||||
enabled: true
|
||||
|
||||
# Kopfzeile über den Spielernamen
|
||||
# Unterstützt Farbcodes (&-Codes) und mehrzeiligen Text mit |
|
||||
header: "&6Willkommen auf &eNexusLobby"
|
||||
|
||||
# Fußzeile unter den Spielernamen
|
||||
# Unterstützt Farbcodes (&-Codes) und mehrzeiligen Text mit |
|
||||
footer: "&7Viel Spaß!"
|
||||
refresh-interval: 40 # Ticks
|
||||
|
||||
# Aktualisierungsintervall in Ticks (20 Ticks = 1 Sekunde)
|
||||
# Niedrigere Werte = häufigere Updates (mehr Performance-Last)
|
||||
# Höhere Werte = seltenere Updates (weniger Performance-Last)
|
||||
refresh-interval: 40
|
||||
|
||||
# --- Items Modul Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# ITEMS MODUL EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Konfiguration der Items, die Spieler in der Lobby erhalten
|
||||
items:
|
||||
# Container für alle Lobby-Werkzeuge
|
||||
lobby-tools:
|
||||
# Kompass (Server-Auswahl / Teleporter)
|
||||
compass:
|
||||
# Aktiviert das Kompass-Item (true = an, false = aus)
|
||||
enabled: true
|
||||
|
||||
# Anzeigename des Items (unterstützt Farbcodes)
|
||||
displayname: "&eTeleporter"
|
||||
|
||||
# Slot im Inventar (0-8, wobei 0 ganz links ist und 8 ganz rechts)
|
||||
slot: 4
|
||||
|
||||
# Baumodus-Umschalter (nur für berechtigte Spieler)
|
||||
build-toggle:
|
||||
# Aktiviert das Baumodus-Item (true = an, false = aus)
|
||||
enabled: true
|
||||
|
||||
# Anzeigename des Items (unterstützt Farbcodes)
|
||||
displayname: "&aBaumodus"
|
||||
|
||||
# Slot im Inventar (0-8)
|
||||
slot: 0
|
||||
|
||||
# Gadget-Menü (Spezialeffekte und Extras)
|
||||
gadget:
|
||||
# Aktiviert das Gadget-Item (true = an, false = aus)
|
||||
enabled: false
|
||||
|
||||
# Anzeigename des Items (unterstützt Farbcodes)
|
||||
displayname: "&bGadgets"
|
||||
|
||||
# Slot im Inventar (0-8)
|
||||
slot: 8
|
||||
|
||||
# --- Portal Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# PORTAL EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Konfiguration für Teleportations-Portale in der Lobby
|
||||
portals:
|
||||
# Standard-Partikeleffekt für alle Portale
|
||||
# Optionen: PORTAL, FLAME, VILLAGER_HAPPY, REDSTONE, ENCHANTMENT_TABLE, etc.
|
||||
# Vollständige Liste: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
|
||||
default-particle: "PORTAL"
|
||||
portal-cooldown: 40 # Ticks, 2 Sekunden
|
||||
save-file: "portals.yml"
|
||||
|
||||
# Cooldown zwischen Portal-Nutzungen in Ticks (20 Ticks = 1 Sekunde)
|
||||
# Verhindert Spam und ungewollte Mehrfach-Teleports
|
||||
portal-cooldown: 40
|
||||
|
||||
# Dateiname für die Speicherung der Portal-Positionen
|
||||
# Wird automatisch im Plugin-Ordner erstellt
|
||||
save-file: "portals.yml"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# COMPASS MENU
|
||||
# -----------------------------------------------------
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# COMPASS MENU (SERVER SWITCHER)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# GUI-Menü das sich öffnet, wenn ein Spieler auf den Kompass klickt
|
||||
compass:
|
||||
# Titel des Inventar-Menüs (unterstützt Farbcodes)
|
||||
title: "&eServer Switcher"
|
||||
|
||||
# Größe des Inventars (muss ein Vielfaches von 9 sein)
|
||||
# Optionen: 9, 18, 27, 36, 45, 54
|
||||
size: 27
|
||||
|
||||
# Server-Einträge im Menü
|
||||
servers:
|
||||
# Erster Server: PvP
|
||||
pvp:
|
||||
# Anzeigename des Items im Menü (unterstützt Farbcodes)
|
||||
name: "&cPvP Arena"
|
||||
|
||||
# Material des Items (muss ein gültiger Minecraft-Material-Name sein)
|
||||
# Liste: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
|
||||
material: "DIAMOND_SWORD"
|
||||
|
||||
# Befehl der beim Klick ausgeführt wird
|
||||
# Für BungeeCord: "server <servername>"
|
||||
# Für Teleport: "spawn <name>" oder andere Custom-Befehle
|
||||
command: "server pvp"
|
||||
|
||||
# Position des Items im Inventar (0 = oben links)
|
||||
slot: 11
|
||||
|
||||
# Beschreibung des Items (wird beim Darüberfahren angezeigt)
|
||||
lore:
|
||||
- "&7Klicke hier um dich"
|
||||
- "&7zum PvP Server zu teleportieren."
|
||||
|
||||
# Zweiter Server: Survival
|
||||
survival:
|
||||
name: "&aSurvival"
|
||||
material: "GRASS_BLOCK"
|
||||
@@ -89,6 +255,8 @@ compass:
|
||||
lore:
|
||||
- "&7Das normale Survival."
|
||||
- "&7Viel Spaß beim Bauen!"
|
||||
|
||||
# Dritter Server: BuildBattle
|
||||
buildbattle:
|
||||
name: "&bBuildBattle"
|
||||
material: "BEDROCK"
|
||||
@@ -97,82 +265,172 @@ compass:
|
||||
lore:
|
||||
- "&7Zeige was du kannst!"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# PLAYER INSPECT (Statistiken per Rechtsklick)
|
||||
# -----------------------------------------------------
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# PLAYER INSPECT (STATISTIKEN PER RECHTSKLICK)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Ermöglicht das Anzeigen von Spieler-Statistiken durch Rechtsklick auf einen Spieler
|
||||
player_inspect:
|
||||
# Aktiviert die Player-Inspect-Funktion (true = an, false = aus)
|
||||
enabled: true
|
||||
gui_title: "&8Statistiken von &6{PLAYER}"
|
||||
|
||||
# Titel des GUI-Fensters das sich öffnet
|
||||
# Platzhalter: {PLAYER} = Name des angeklickten Spielers
|
||||
gui_title: "&8Statistiken von &6{PLAYER}"
|
||||
|
||||
# --- Suppressor / Global Chat Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# SUPPRESSOR / GLOBAL CHAT EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Join/Quit-Nachrichten Unterdrückung und BungeeCord-Messaging
|
||||
suppressor:
|
||||
# Aktiviert das Suppressor-System (true = an, false = aus)
|
||||
enabled: true
|
||||
|
||||
# Unterdrückt Join- und Quit-Nachrichten für neue Spieler temporär
|
||||
# true = Nachrichten werden unterdrückt, false = normale Anzeige
|
||||
# Nützlich um Spam zu vermeiden wenn viele Spieler gleichzeitig joinen/leaven
|
||||
suppress-join-quit: true
|
||||
suppress-duration-ticks: 40 # Zeit, bis Spieler wieder sichtbar
|
||||
|
||||
# Dauer der Unterdrückung in Ticks (20 Ticks = 1 Sekunde)
|
||||
# Nach dieser Zeit werden Join/Quit-Nachrichten wieder normal angezeigt
|
||||
suppress-duration-ticks: 40
|
||||
|
||||
# BungeeCord Plugin-Messaging Channels
|
||||
# Diese Channels werden für die Kommunikation zwischen Servern verwendet
|
||||
channels:
|
||||
control: "global:control" # Channel für Join/Quit Suppression
|
||||
chat: "global:chat" # Channel für globales Chat-Relay
|
||||
# Channel für Join/Quit-Suppression-Control
|
||||
control: "global:control"
|
||||
|
||||
# Channel für globales Chat-Relay über alle Server
|
||||
chat: "global:chat"
|
||||
|
||||
# --- Logging Einstellungen ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# LOGGING EINSTELLUNGEN
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Konfiguration der Plugin-Logs und Debug-Ausgaben
|
||||
logging:
|
||||
enable-debug: true # Aktiviert detaillierte Logs für Module
|
||||
log-file: "logs/plugin.log" # Pfad für das Logfile
|
||||
# Aktiviert detaillierte Debug-Logs in der Konsole
|
||||
# true = Sehr ausführliche Logs (nur zur Fehlersuche empfohlen)
|
||||
# false = Normale Logs
|
||||
# WARNUNG: Bei true kann die Konsole sehr voll werden!
|
||||
enable-debug: true
|
||||
|
||||
# Pfad zur Log-Datei des Plugins
|
||||
# Relativ zum Plugin-Ordner
|
||||
log-file: "logs/plugin.log"
|
||||
|
||||
# --- Wartungsmodus ---
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# WARTUNGSMODUS
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Sperrt den Server für normale Spieler während Wartungsarbeiten
|
||||
maintenance:
|
||||
# Aktiviert den Wartungsmodus (true = an, false = aus)
|
||||
# Wenn aktiviert, können nur Spieler mit der Permission "nexuslobby.maintenance.bypass" joinen
|
||||
enabled: false
|
||||
|
||||
# Nachricht die Spielern angezeigt wird, wenn sie gekickt werden
|
||||
# Unterstützt Farbcodes und \n für Zeilenumbrüche
|
||||
kick_message: "&cServer im Wartungsmodus! Du darfst nicht joinen."
|
||||
|
||||
# -----------------------------------------------------
|
||||
# VOID PROTECTION
|
||||
# -----------------------------------------------------
|
||||
# Verhindert, dass Spieler in die Leere fallen
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# VOID PROTECTION (SCHUTZ VOR LEERE)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Verhindert dass Spieler in die Leere fallen und im Void sterben
|
||||
void_protection:
|
||||
# Aktiviert den Void-Schutz (true = an, false = aus)
|
||||
enabled: true
|
||||
# Teleportiert den Spieler zum Welt-Spawn
|
||||
|
||||
# Teleportiert Spieler zum Spawn zurück wenn sie in die Leere fallen
|
||||
# true = Teleport zum Spawn, false = Spieler nimmt Schaden/stirbt
|
||||
teleport_to_spawn: true
|
||||
# Nachricht beim Teleport (Leer lassen für keine Nachricht)
|
||||
|
||||
# Nachricht die dem Spieler beim Teleport angezeigt wird
|
||||
# Leer lassen ("") für keine Nachricht
|
||||
message: "&cDu bist in die Leere gefallen und wurdest teleportiert!"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# DOUBLE JUMP
|
||||
# -----------------------------------------------------
|
||||
# Erlaubt einen Doppelsprung in der Lobby
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# DOUBLE JUMP (DOPPELSPRUNG)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Erlaubt Spielern einen Doppelsprung in der Luft
|
||||
doublejump:
|
||||
# Aktiviert die Doppelsprung-Funktion (true = an, false = aus)
|
||||
enabled: true
|
||||
# Stärke des Sprungs nach oben
|
||||
|
||||
# Stärke des Sprungs nach oben (vertikale Geschwindigkeit)
|
||||
# Standardwert: 1.0
|
||||
# Höhere Werte = höherer Sprung, niedrigere Werte = flacherer Sprung
|
||||
# Empfohlener Bereich: 0.5 - 2.0
|
||||
velocity: 1.0
|
||||
# Vorwärts-Schub beim Sprung
|
||||
|
||||
# Vorwärts-Schub beim Sprung (horizontale Geschwindigkeit)
|
||||
# Standardwert: 0.2
|
||||
# Höhere Werte = mehr Vorwärtsschub, 0.0 = kein Vorwärtsschub
|
||||
# Empfohlener Bereich: 0.0 - 0.5
|
||||
horizontal: 0.2
|
||||
|
||||
# -----------------------------------------------------
|
||||
# PLAYER HIDER
|
||||
# -----------------------------------------------------
|
||||
# Item, um andere Spieler zu verstecken/anzuzeigen
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# PLAYER HIDER (SPIELER VERSTECKEN)
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Item zum Verstecken/Anzeigen anderer Spieler in der Lobby
|
||||
hider:
|
||||
# Aktiviert die Player-Hider-Funktion (true = an, false = aus)
|
||||
enabled: true
|
||||
# Material-Name (Muss ein gültiger Bukkit-Material-Name sein)
|
||||
|
||||
# Material des Items im Inventar
|
||||
# Kann je nach Status wechseln (z.B. grüner/roter Farbstoff)
|
||||
# Liste: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
|
||||
item: "REDSTONE"
|
||||
|
||||
# Slot im Inventar (0-8)
|
||||
slot: 8
|
||||
|
||||
# Nachrichten für verschiedene Zustände
|
||||
messages:
|
||||
# Anzeigename des Items und Nachricht, wenn alle sichtbar sind
|
||||
# Anzeigename und Nachricht wenn alle Spieler sichtbar sind
|
||||
# Wird angezeigt wenn der Spieler auf das Item klickt und Spieler sichtbar sind
|
||||
all: "&aAlle Spieler: &7Sichtbar"
|
||||
# Anzeigename des Items und Nachricht, wenn alle versteckt sind
|
||||
none: "&cKeine Spieler: &7Versteckt"
|
||||
|
||||
# Anzeigename und Nachricht wenn alle Spieler versteckt sind
|
||||
# Wird angezeigt wenn der Spieler auf das Item klickt und Spieler versteckt sind
|
||||
none: "&cKeine Spieler: &7Versteckt"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# BALL / SOCCER EINSTELLUNGEN
|
||||
# -----------------------------------------------------
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Aktiviert ein Fußball-System in der Lobby zum Spielen
|
||||
ball:
|
||||
# Aktiviert das Ball-System (true = an, false = aus)
|
||||
enabled: true
|
||||
# Der Spawnpunkt wird automatisch über /nexus ball setspawn hier gespeichert
|
||||
|
||||
# Spawn-Position des Balls
|
||||
# Tipp: Nutze /nexus ball setspawn um diese Position automatisch zu setzen
|
||||
spawn:
|
||||
# Name der Welt in der der Ball spawnt
|
||||
world: "world"
|
||||
|
||||
# X-Koordinate des Ball-Spawns
|
||||
x: 10.5
|
||||
|
||||
# Y-Koordinate des Ball-Spawns
|
||||
y: 65.0
|
||||
|
||||
# Z-Koordinate des Ball-Spawns
|
||||
z: 10.5
|
||||
|
||||
# Blickrichtung des Balls (normalerweise nicht relevant)
|
||||
yaw: 0.0
|
||||
pitch: 0.0
|
||||
# Zeit in Sekunden, bis der Ball bei Inaktivität respawnt
|
||||
respawn_delay: 60
|
||||
|
||||
# Zeit in Sekunden bis der Ball bei Inaktivität automatisch respawnt
|
||||
# Nützlich wenn der Ball verloren geht oder stecken bleibt
|
||||
# 0 = Kein automatischer Respawn
|
||||
respawn_delay: 60
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# Links
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
#
|
||||
# Benötigst du Hilfe oder Support?
|
||||
# - Webseite: https://m-viper.de
|
||||
# - Dokumentation: https://git.viper.ipv64.net/M_Viper/NexusLobby/wiki
|
||||
# - Discord: https://discord.com/invite/FdRs4BRd8D
|
||||
# - GitHub: https://git.viper.ipv64.net/M_Viper/NexusLobby
|
||||
@@ -1,5 +1,12 @@
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# =============================================================
|
||||
# NexusLobby - Lebendige Dialoge v2
|
||||
# Dialoge und Gespräche in der Lobby
|
||||
# =============================================================
|
||||
|
||||
conversations:
|
||||
|
||||
203
src/main/resources/lang.yml
Normal file
203
src/main/resources/lang.yml
Normal file
@@ -0,0 +1,203 @@
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# =====================================================
|
||||
# DEFAULT Language
|
||||
# =====================================================
|
||||
|
||||
soccer_module_not_loaded:
|
||||
de: "§cDas Fußball-Modul ist nicht geladen."
|
||||
en: "§cThe soccer module is not loaded."
|
||||
parkour_usage:
|
||||
de: "§8[§6Nexus§8] §7Nutze: §e/nexus parkour <setstart|setfinish|setcheckpoint|reset|clear|removeall>"
|
||||
en: "§8[§6Nexus§8] §7Usage: §e/nexus parkour <setstart|setfinish|setcheckpoint|reset|clear|removeall>"
|
||||
parkour_run_aborted:
|
||||
de: "§8[§6Nexus§8] §7Dein aktueller Lauf wurde abgebrochen."
|
||||
en: "§8[§6Nexus§8] §7Your current run was aborted."
|
||||
parkour_besttimes_cleared:
|
||||
de: "§8[§6Nexus§8] §aAlle Parkour-Bestzeiten wurden gelöscht!"
|
||||
en: "§8[§6Nexus§8] §aAll parkour best times have been cleared!"
|
||||
parkour_track_removed:
|
||||
de: "§8[§6Nexus§8] §cDie gesamte Strecke (Checkpoints & Ziel) wurde gelöscht!"
|
||||
en: "§8[§6Nexus§8] §cThe entire track (checkpoints & finish) has been removed!"
|
||||
unknown_subcommand:
|
||||
de: "§cUnbekannter Unterbefehl."
|
||||
en: "§cUnknown subcommand."
|
||||
parkour_npc_marked:
|
||||
de: "§8[§6Nexus§8] §aArmorStand als Parkour-NPC markiert!"
|
||||
en: "§8[§6Nexus§8] §aArmorStand marked as parkour NPC!"
|
||||
parkour_start_set:
|
||||
de: "§8[§6Nexus§8] §aParkour-Startpunkt an deiner Position gesetzt!"
|
||||
en: "§8[§6Nexus§8] §aParkour start set at your position!"
|
||||
scoreboard_usage:
|
||||
de: "§cBenutzung: /nexus sb <on|off|admin|spieler>"
|
||||
en: "§cUsage: /nexus sb <on|off|admin|player>"
|
||||
scoreboard_module_disabled:
|
||||
de: "§cScoreboard-Modul ist deaktiviert."
|
||||
en: "§cScoreboard module is disabled."
|
||||
info_header:
|
||||
de: "§8§m--------------------------------------"
|
||||
en: "§8§m--------------------------------------"
|
||||
info_title:
|
||||
de: "§6§lNexusLobby §7- Informationen"
|
||||
en: "§6§lNexusLobby §7- Information"
|
||||
info_spawn:
|
||||
de: "§f/spawn §7- Zum Spawn"
|
||||
en: "§f/spawn §7- To spawn"
|
||||
info_parkour:
|
||||
de: "§f/setstart §8| §f/setcheckpoint §8| §f/setfinish"
|
||||
en: "§f/setstart §8| §f/setcheckpoint §8| §f/setfinish"
|
||||
info_removeall:
|
||||
de: "§f/nexus parkour removeall §7- Strecke löschen"
|
||||
en: "§f/nexus parkour removeall §7- Remove track"
|
||||
info_ball:
|
||||
de: "§f/nexus ball setspawn §7- Fußball Spawn setzen"
|
||||
en: "§f/nexus ball setspawn §7- Set soccer spawn"
|
||||
info_setspawn:
|
||||
de: "§f/nexus setspawn §7- Spawn setzen"
|
||||
en: "§f/nexus setspawn §7- Set spawn"
|
||||
info_scoreboard:
|
||||
de: "§f/nexus sb <on|off> §7- Scoreboard"
|
||||
en: "§f/nexus sb <on|off> §7- Scoreboard"
|
||||
info_reload:
|
||||
de: "§f/nexus reload §7- Config laden"
|
||||
en: "§f/nexus reload §7- Reload config"
|
||||
info_footer:
|
||||
de: "§8§m--------------------------------------"
|
||||
en: "§8§m--------------------------------------"
|
||||
parkour_trainer_greeting:
|
||||
de: "§6§lTrainer §8» §aViel Erfolg beim Parkour! Gib dein Bestes!"
|
||||
en: "§6§lTrainer §8» §aGood luck with the parkour! Give it your best!"
|
||||
update_available:
|
||||
de: "§8[§6Nexus§8] §aEin neues §6Update §afür §eNexusLobby §aist verfügbar!"
|
||||
en: "§8[§6Nexus§8] §aA new §6update §afor §eNexusLobby §ais available!"
|
||||
update_version:
|
||||
de: "§8» §7Version: §c{old} §8-> §a{new}"
|
||||
en: "§8» §7Version: §c{old} §8-> §a{new}"
|
||||
update_download_link:
|
||||
de: "§8» §6Klicke §e§l[HIER] §6zum Herunterladen."
|
||||
en: "§8» §6Click §e§l[HERE] §6to download."
|
||||
update_download_hover:
|
||||
de: "§7Öffnet die Release-Seite"
|
||||
en: "§7Opens the release page"
|
||||
hider_all:
|
||||
de: "§aAlle Spieler"
|
||||
en: "§aAll players"
|
||||
hider_none:
|
||||
de: "§cKeine Spieler"
|
||||
en: "§cNo players"
|
||||
void_protection_message:
|
||||
de: "§cDu wurdest vor dem Void gerettet!"
|
||||
en: "§cYou were saved from the void!"
|
||||
proxy_not_registered:
|
||||
de: "§cProxy-Verbindung nicht möglich (BungeeCord Kanal nicht registriert)."
|
||||
en: "§cProxy connection not possible (BungeeCord channel not registered)."
|
||||
connecting_to_server:
|
||||
de: "§eVerbinde zu: §f{server}"
|
||||
en: "§eConnecting to: §f{server}"
|
||||
server_connect_error:
|
||||
de: "§cFehler beim Verbinden zum Server."
|
||||
en: "§cError connecting to server."
|
||||
proxy_connect_error:
|
||||
de: "§cProxy-Verbindung nicht möglich."
|
||||
en: "§cProxy connection not possible."
|
||||
armorstand_lookat_required:
|
||||
de: "§cDu musst einen ArmorStand direkt anschauen (Fadenkreuz)!"
|
||||
en: "§cYou must look directly at an ArmorStand (crosshair)!"
|
||||
conv_link_usage:
|
||||
de: "§cNutze: /nexuscmd conv link <Dialog-ID>"
|
||||
en: "§cUsage: /nexuscmd conv link <Dialog-ID>"
|
||||
conv_mark_npcs:
|
||||
de: "§cBitte markiere mindestens die ersten beiden NPCs (select1 & select2)!"
|
||||
en: "§cPlease mark at least the first two NPCs (select1 & select2)!"
|
||||
conv_link_created:
|
||||
de: "§a§lDauerhafte Verknüpfung erstellt!"
|
||||
en: "§a§lPermanent link created!"
|
||||
conv_link_npcs:
|
||||
de: "§7Beteiligte NPCs: §e{count}"
|
||||
en: "§7Linked NPCs: §e{count}"
|
||||
conv_speaker_not_found:
|
||||
de: "§cFehler: Sprecher 1 nicht gefunden."
|
||||
en: "§cError: Speaker 1 not found."
|
||||
conv_unlink_lookat:
|
||||
de: "§cSchau den NPC an, dessen Verknüpfung du lösen willst!"
|
||||
en: "§cLook at the NPC you want to unlink!"
|
||||
conv_unlinked:
|
||||
de: "§eNPC-Verknüpfung wurde aufgehoben."
|
||||
en: "§eNPC link has been removed."
|
||||
conv_start_usage:
|
||||
de: "§cNutze: /nexuscmd conv start <ID>"
|
||||
en: "§cUsage: /nexuscmd conv start <ID>"
|
||||
conv_mark_two_npcs:
|
||||
de: "§cBitte markiere mindestens zwei NPCs!"
|
||||
en: "§cPlease mark at least two NPCs!"
|
||||
npc_bubble_sent:
|
||||
de: "§aNPC-Sprechblase gesendet."
|
||||
en: "§aNPC speech bubble sent."
|
||||
lookat_off:
|
||||
de: "§cBlickkontakt aus."
|
||||
en: "§cLook-at disabled."
|
||||
lookat_on:
|
||||
de: "§aBlickkontakt an."
|
||||
en: "§aLook-at enabled."
|
||||
name_removed:
|
||||
de: "§eName entfernt."
|
||||
en: "§eName removed."
|
||||
name_set:
|
||||
de: "§7Name gesetzt: {name}"
|
||||
en: "§7Name set: {name}"
|
||||
status_backup_saved:
|
||||
de: "§8(Status-Backup wurde gespeichert)"
|
||||
en: "§8(Status backup saved)"
|
||||
command_bound:
|
||||
de: "§aBefehl gebunden."
|
||||
en: "§aCommand bound."
|
||||
no_target:
|
||||
de: "§cKein Ziel!"
|
||||
en: "§cNo target!"
|
||||
commands_and_tags:
|
||||
de: "§6§lBefehle & Tags:"
|
||||
en: "§6§lCommands & Tags:"
|
||||
commands_removed:
|
||||
de: "§eAlle Befehle gelöscht."
|
||||
en: "§eAll commands removed."
|
||||
welcome:
|
||||
de: "Willkommen auf dem Server!"
|
||||
en: "Welcome to the server!"
|
||||
no_permission:
|
||||
de: "§cKeine Berechtigung."
|
||||
en: "§cNo permission."
|
||||
only_player:
|
||||
de: "§cDieser Befehl ist nur für Spieler!"
|
||||
en: "§cThis command is for players only!"
|
||||
parkour_checkpoint_set:
|
||||
de: "§8[§6Nexus§8] §aParkour-Checkpoint gesetzt!"
|
||||
en: "§8[§6Nexus§8] §aParkour checkpoint set!"
|
||||
parkour_finish_set:
|
||||
de: "§8[§6Nexus§8] §aParkour-Zielpunkt gesetzt!"
|
||||
en: "§8[§6Nexus§8] §aParkour finish set!"
|
||||
teleport_spawn:
|
||||
de: "§8[§6Nexus§8] §aDu wurdest zum Spawn teleportiert."
|
||||
en: "§8[§6Nexus§8] §aYou have been teleported to spawn."
|
||||
spawn_world_missing:
|
||||
de: "§cFehler: Die Spawn-Welt existiert nicht."
|
||||
en: "§cError: The spawn world does not exist."
|
||||
spawn_not_set:
|
||||
de: "§cEs wurde noch kein Spawn gesetzt."
|
||||
en: "§cNo spawn has been set yet."
|
||||
plugin_reloaded:
|
||||
de: "§8[§6Nexus§8] §aPlugin erfolgreich neu geladen!"
|
||||
en: "§8[§6Nexus§8] §aPlugin successfully reloaded!"
|
||||
spawn_set:
|
||||
de: "§8[§6Nexus§8] §aLobby-Spawn erfolgreich gesetzt!"
|
||||
en: "§8[§6Nexus§8] §aLobby spawn set successfully!"
|
||||
silentjoin_on:
|
||||
de: "§8[§6Nexus§8] §7Silent Join: §aAktiviert"
|
||||
en: "§8[§6Nexus§8] §7Silent Join: §aEnabled"
|
||||
silentjoin_off:
|
||||
de: "§8[§6Nexus§8] §7Silent Join: §cDeaktiviert"
|
||||
en: "§8[§6Nexus§8] §7Silent Join: §cDisabled"
|
||||
@@ -1,6 +1,6 @@
|
||||
name: NexusLobby
|
||||
main: de.nexuslobby.NexusLobby
|
||||
version: "1.1.0"
|
||||
version: "1.1.1"
|
||||
api-version: "1.21"
|
||||
author: M_Viper
|
||||
description: Modular Lobby Plugin with an invisible Particle-Parkour system.
|
||||
@@ -125,6 +125,18 @@ permissions:
|
||||
nexuslobby.silentjoin:
|
||||
description: Versteckt die Join-Nachricht für den Spieler (Silent Join)
|
||||
default: op
|
||||
nexuslobby.join.maintenance:
|
||||
description: Darf den Server trotz Wartungsmodus betreten
|
||||
default: op
|
||||
nexuslobby.security.bypass:
|
||||
description: Umgeht den Security-Check (VPN/Country)
|
||||
default: op
|
||||
nexuslobby.scoreboard.admin:
|
||||
description: Darf das Scoreboard im Admin-Modus nutzen
|
||||
default: op
|
||||
nexuslobby.border.bypass:
|
||||
description: Umgeht die Lobby-Grenze
|
||||
default: op
|
||||
nexuslobby.parkour.admin:
|
||||
description: Erlaubt das Setzen der unsichtbaren Parkour-Punkte (Start, Ziel, Checkpoints)
|
||||
default: op
|
||||
@@ -1,6 +1,12 @@
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# =====================================================
|
||||
# NEXUSLOBBY – DEFAULT LOBBY GAMERULES
|
||||
# Minecraft 1.21.1
|
||||
# DEFAULT LOBBY GAMERULES
|
||||
# =====================================================
|
||||
|
||||
# -------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# _ __ __ __ __
|
||||
# / | / /__ _ ____ _______/ / ____ / /_ / /_ __ __
|
||||
# / |/ / _ \| |/_/ / / / ___/ / / __ \/ __ \/ __ \/ / / /
|
||||
# / /| / __/> </ /_/ (__ ) /___/ /_/ / /_/ / /_/ / /_/ /
|
||||
# /_/ |_/\___/_/|_|\__,_/____/_____/\____/_.___/_.___/\__, /
|
||||
# /____/
|
||||
#
|
||||
# -----------------------------------------------------
|
||||
# NEXUSLOBBY - VISUELLE EINSTELLUNGEN
|
||||
# VISUELLE EINSTELLUNGEN
|
||||
# -----------------------------------------------------
|
||||
|
||||
# --- Tablist Einstellungen ---
|
||||
|
||||
Reference in New Issue
Block a user