Soccer aktualisiert

2026-02-26 10:12:09 +00:00
parent 1b9680bd4e
commit 3437ecaaff

@@ -1,14 +1,25 @@
# Soccer Module
Das **Soccer-Modul** ist eine interaktive Lobby-Komponente für **NexusLobby**.
Es implementiert einen physikbasierten Fußball auf Basis von ArmorStands und Custom-Skins.
Es implementiert einen physikbasierten Fußball auf Basis von ArmorStands und Custom-Skins,
inklusive vollständigem Tor-System mit Punktestand und visuellen Partikel-Toren.
---
## 📋 Features
- **Physik-Engine**
Automatisches Dribbling bei Annäherung und Schuss-Funktion per Linksklick.
Automatisches Dribbling bei Annäherung und Schuss-Funktion per Linksklick.
Wandprall-System mit konfigurierbarem Dämpfungsfaktor.
- **Zuverlässige Tor-Erkennung**
Segment-basierter Raycast pro Tick (`prevPos → newPos`) mit 0.1-Block-Schrittweite.
Erkennt Schüsse, Dribbling und Doppelklick-Pässe gleichermaßen zuverlässig
unabhängig von der Ballgeschwindigkeit.
- **Tor-System**
Unbegrenzte Tore per Command definierbar, jedes Tor einem von zwei Teams zugewiesen.
Partikel-Visualisierung der Tor-Bounding-Box (Blau / Rot).
Punktestand mit Title-Anzeige und Sound bei jedem Tor.
- **Custom Texture**
Hochauflösender Fußball-Skin via Bukkit-Profile-API
@@ -18,26 +29,44 @@ Es implementiert einen physikbasierten Fußball auf Basis von ArmorStands und Cu
Vollständiger Schutz gegen Diebstahl des Items oder Zerstörung des Entities.
- **Smart-Respawn**
Automatisches Zurücksetzen bei Inaktivität oder Verlust des Balls (Void).
Automatisches Zurücksetzen bei Inaktivität oder Verlust des Balls (Void).
Nach jedem Tor automatischer Respawn am konfigurierten Spawn-Punkt.
---
## ⌨️ Administrative Commands
Alle Befehle benötigen die Permission:
```text
nexuslobby.admin
```
---
## ⌨️ Administrative Commands
### Ball
| Command | Aktion |
|--------|--------|
|---|---|
| `/nexuslobby ball setspawn` | Speichert den aktuellen Standort als permanenten Ball-Spawn |
| `/nexuslobby ball respawn` | Erzwingt ein sofortiges Neuladen des Ball-Entities |
| `/nexuslobby ball remove` | Entfernt den Ball ohne Respawn |
### Tore
| Command | Aktion |
|---|---|
| `/nexuslobby ball goal pos1` | Setzt die erste Ecke des Tors (aktueller Standort) |
| `/nexuslobby ball goal pos2` | Setzt die gegenüberliegende Ecke des Tors |
| `/nexuslobby ball goal save <Name> <1\|2>` | Speichert das Tor für Team 1 (Blau) oder Team 2 (Rot) |
| `/nexuslobby ball goal delete <Name>` | Löscht ein bestehendes Tor |
| `/nexuslobby ball goal list` | Listet alle gespeicherten Tore mit Positionen |
| `/nexuslobby ball goal show` | Zeigt alle Tor-Boxen für ~2 Sekunden als Partikel an |
| `/nexuslobby ball goal debug` | Zeigt Ball-Position und Tor-Erkennungs-Status live |
### Punktestand
| Command | Aktion |
|---|---|
| `/nexuslobby ball score` | Zeigt den aktuellen Spielstand an |
| `/nexuslobby ball score reset` | Setzt den Punktestand beider Teams auf 0 zurück |
---
@@ -47,18 +76,47 @@ Die Werte werden unter dem `ball`-Pfad verwaltet:
```yaml
ball:
spawn: # (Wird automatisch via Command gesetzt)
enabled: true
spawn: # Wird automatisch via /nexuslobby ball setspawn gesetzt
world: "world"
x: 0.0
y: 65.0
z: 0.0
respawn_delay: 60 # Zeit in Sekunden, bis der Ball bei Inaktivität respawnt
goals: # Wird automatisch via /nexuslobby ball goal save befüllt
torBlau:
pos1:
world: world
x: 100.0
y: 64.0
z: 198.0
pos2:
world: world
x: 106.0
y: 68.0
z: 200.5 # mind. 1.5 Blöcke Tiefe in Schussrichtung empfohlen
team: 1 # 1 = Blau, 2 = Rot
```
> **Hinweis zum Tor einrichten:**
> Die Tor-Box muss mindestens **1.5 Blöcke Tiefe** in Schussrichtung und
> mindestens **3 Blöcke Höhe** haben. Nutze `/nexuslobby ball goal show`
> um die Box sichtbar zu machen, und `/nexuslobby ball goal debug` um
> Ball-Position und Erkennung live zu prüfen.
---
## 🧱 Technische Spezifikationen
- **Base-Entity:** ArmorStand (Small, Invisible)
- **Base-Entity:** ArmorStand (Small, Invisible, kein BasePlate)
- **Tor-Erkennung:** Segment-Raycast `prevPos → currentPos + velocity` pro Server-Tick, Schrittweite 0.1 Blöcke, drei Y-Offsets (Fuß / Mitte / Kopf des ArmorStands)
- **Texture-URL:**
`http://textures.minecraft.net/texture/451f8cfcfb85d...`
- **Spawn-Logik:**
Nutzt einen Schwerkraft-Offset von `+0.5`, um Clipping-Fehler im Boden zu vermeiden.
`http://textures.minecraft.net/texture/451f8cfcfb85d77945dc6a3618414093e70436b46d2577b28c727f1329b7265e`
- **Dribbling-Radius:** 0.7 Blöcke horizontal, 0.5 Blöcke vertikal
- **Kick-Kraft:** 1.35 Blöcke/Tick horizontal, 0.38 Blöcke/Tick vertikal
- **Wand-Dämpfung:** 75 % der Geschwindigkeit nach Aufprall
- **Tor-Cooldown:** 3 Sekunden zwischen zwei Wertungen (verhindert Doppel-Trigger)
- **Respawn nach Tor:** 4 Sekunden Verzögerung (80 Ticks)