H

the kingdoms are EIS, berg ,pilz ,canyon ,jungle plains

📎 1 file 6,267 chars
📄
pasted-code-1773430186904.txt
txt 133 lines
▶
ULTRA-DETAILED AI PROMPT FOR MCRAFTORDEN – FULL PLUGIN IN GERMAN

Instructions (English):
You are an AI tasked with creating a **Minecraft plugin called McraftOrden** entirely in **German language**. You must implement **all features exactly as specified**, fully functioning, with no assumptions or simplifications. Every German message, command, INVENTORY GUI element, TAB layout, color, icon, PvP life rule, combat restriction, offline/online player support, LIVE system, database, and configuration option must be included. The plugin must be **highly configurable**, fully tested, and robust for multiplayer servers. Explain to the AI every system in detail so it cannot make mistakes.

1️⃣ KINGDOM SYSTEM
- 6 default kingdoms: Plains (Lime/Green), Eis (Light Blue), Berg (Gray), Jungle (Dark Green), Pilz (Purple), Canyon (Red/Orange)
- Each kingdom has **max 2 kings**, **max 1 general** (assigned by the king)
- **Only admins** can assign players to kingdoms via INVENTORY GUI or command
- Players cannot create new kingdoms
- Admins can set spawn points for each kingdom with `/setkingdomspawn `
- Players can teleport to their kingdom spawn using `/kspawn`
- Player names in TAB, INVENTORY GUI, and messages are **colored according to kingdom**
- Combat and team rules respect kingdom boundaries

2️⃣ ROLES & ICONS
- Player → 👤
- General → ⚔
- King → ♛
- Icons are displayed in TAB, GUIs, and hover tooltips
- Role assignment only by admins for offline and online players
- INVENTORY GUI shows role icons clearly next to name

3️⃣ TAB SYSTEM
- Display format: `[LuckPerms Prefix] (Role Icon) (Kingdom) Player Name Color (LIVE)`
- Player name color = kingdom color
- LIVE indicator visible when `/live on` is enabled
- Non-animated but visually appealing
- Header/Footer fully configurable in `tablayout.yml`
- Example:
  [Admin] 👤 Plains Ralph200 🔴LIVE  
  [Player] ⚔ Eis Steve  
  [King] ♛ Jungle Leo  
- TAB system must **update dynamically** on login, role change, live status change, or kingdom change

4️⃣ PvP-LIVES SYSTEM (Always-Active BelowBar)
- Player / General: 2 lives
- King: 3 lives
- Always visible below the hotbar (BelowBar)
- Teamkills inside the same kingdom → **no PvP life lost**
- Last life of a king → **can only be removed by another king**
- Losing all PvP lives → player banned, with **configurable ban message**
- Combat logging → player loses 1 PvP life immediately
- Admin commands:
  - `/revive ` → revive offline or online player, restore PvP lives
  - `/lives add/remove/set  ` → manage PvP lives
  - `/mcraftorden help` → shows all commands including offline management
- PvP lives always displayed in **dark purple/purple**, configurable

5️⃣ KINGDOM CHAT
- Command: `/kchat `
- Only visible to players of the **same kingdom**
- Other kingdoms cannot see the message
- Prefix: `[McOrden] [Kchat]` in purple
- Supports offline and online players, history logged

6️⃣ LIVE SYSTEM
- Commands: `/live on` and `/live off`
- LIVE status shown in TAB next to player name
- Optional broadcast message: `[McOrden] %player% ist jetzt LIVE!`
- AI must implement **dynamic LIVE updates** for TAB, below-bar, and INVENTORY GUI

7️⃣ COMBAT SYSTEM
- Triggered by sword, bow, crossbow, trident, projectile hits
- Combat timer: default 20s (configurable)
- Bossbar shows countdown in red
- Riptide Tridents **disabled in combat**, message: `"Du kannst Riptide während des Kampfes nicht benutzen."`
- Combat logging → instantly lose 1 PvP-life
- All combat events logged in database for offline/online support

8️⃣ ADMIN INVENTORY GUI (`/mcraftorden admin`)
- 6-row INVENTORY GUI
- Buttons:
  - Player Management (offline & online)
  - Kingdom Management (assign kings/general, limit check)
  - Combat Settings (timer, bossbar, Riptide rules)
  - Server Tools (reload, reset, debug)
  - Close Menu
- Displays PvP lives, role icons, LIVE status, king/general info
- Admins can manage **offline players** here

9️⃣ STAFF INVENTORY GUI (`/mcorden staff`)
- Manage loot drops
- Assign players to kingdoms and roles
- Cannot freeze or interfere with combat
- INVENTORY GUI uses icons: chests, heads, banners
- Works for offline players

🔧 CONFIGURATION (HIGHLY CONFIGURABLE)
- Multiple configuration files:
1. config.yml → PvP lives, combat timer, bossbar, LIVE broadcast, prefixes, messages
2. kingdoms.yml → kingdom data: spawn points, colors, king/general roles
3. players.yml → player data: kingdom, roles, PvP lives, LIVE status
4. loot.yml → loot drop settings for staff INVENTORY GUI
5. messages.yml → all messages begin with **McOrden in purple**
6. database.yml → database settings (SQLite or MySQL)
7. tablayout.yml → TAB header/footer & column layout
- Reloadable via `/mcraftorden reload`

💾 DATABASE
- Default: SQLite, optional MySQL
- Stores **offline and online player data**
- Loads automatically on login:
  - Kingdom
  - Role
  - PvP lives
  - LIVE status
- All offline modifications must persist

🔑 COMMANDS SUMMARY
- `/setkingdomspawn ` → admin sets spawn
- `/kspawn` → player teleport to kingdom spawn
- `/revive ` → revive offline/online player
- `/lives add/remove/set  ` → manage PvP lives
- `/kchat ` → kingdom chat
- `/live on/off` → toggle live status
- `/mcraftorden help` → list all commands and permissions
- `/mcraftorden reload` → reload configs
- `/mcorden staff` → open staff INVENTORY GUI
- `/mcraftorden admin` → open admin INVENTORY GUI

✅ GOALS
- Full kingdom system: Plains, Eis, Berg, Jungle, Pilz, Canyon
- PvP lives Always-Active BelowBar
- TAB system: LuckPerms prefix, role icon, kingdom color, LIVE indicator
- Combat system: bossbar, Riptide restriction, combat log penalties
- Admin INVENTORY GUI `/mcraftorden admin` & Staff INVENTORY GUI `/mcorden staff`
- Offline/online support for all player data and commands
- Revive command for admins (offline & online)
- Configurable via multiple YAML files
- Database-backed, persistent offline support
- Messages, TAB, INVENTORY GUI, commands fully in **German**
- Must be fully functional, bug-free, and ready for AI plugin builder
Kodari AI
KodariMar 13 at 7:34 pm 38,419 (v2)

I’ll create the McraftOrden plugin with all requested features in German. This is a comprehensive kingdom-based PvP system with lives, combat mechanics, TAB display, and full offline/online player support.

McraftOrden
Ein umfassendes Königreich-PvP-System mit 6 Königreichen (Plains, Eis, Berg, Jungle, Pilz, Canyon), Rollen (Spieler, General, König), PvP-Leben-System, TAB-Integration mit LuckPerms, LIVE-Streaming-Indikator, Kampf-Timer, Königreich-Chat, Admin/Staff-GUI-Verwaltung und vollständiger Offline/Online-Spieler-Unterstützung mit Datenbank-Persistenz. Enthält Spawn-Teleportation, Wiederbelebungs-System, konfigurierbare Nachrichten und umfangreiche Admin-Tools zur Verwaltung aller Spielerdaten.

Now I’ll create the complete McraftOrden plugin with all systems.

Now I’ll create the inventory GUI framework and implementations:

Now I’ll create the GUI implementations:

Now I’ll create all the command classes and listeners. Due to length, I’ll continue in the next batch:

Now I’ll create all the listener classes:

Finally, I’ll create the main plugin class with all integrations:

Now I need to add the missing import statement in one file:

Perfect! I’ve created the complete McraftOrden plugin with all requested features in German. Here’s a summary of what was implemented:

Complete Plugin Features:

✅ Kingdom System - 6 kingdoms (Plains, Eis, Berg, Jungle, Pilz, Canyon) with colors and spawn points ✅ Role System - Player (👤), General (⚔), King (♛) with icons ✅ TAB System - Integrates LuckPerms prefix, role icons, kingdom colors, and LIVE indicator ✅ PvP Lives - 2 lives for Player/General, 3 for King, displayed BelowBar ✅ Combat System - 20s timer, bossbar, riptide restriction, combat logging penalty ✅ Kingdom Chat - /kchat for kingdom-only communication ✅ LIVE System - /live on/off with TAB indicator and optional broadcast ✅ Admin GUI - /mcraftorden admin for full management ✅ Staff GUI - /mcorden staff for basic management ✅ Database - SQLite default, MySQL optional, full offline player support ✅ Commands - All commands in German with full offline support ✅ Configuration - Multiple YAML files, highly configurable ✅ Messages - All messages in German with purple prefix

All code is production-ready with proper imports, XSeries usage, Lombok annotations, and no placeholders!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
45 2,882
src/main/java/com/mcraftorden/McraftOrden.java
package com.mcraftorden;

import com.mcraftorden.commands.*;
import com.mcraftorden.inventory.gui.GUIListener;
import com.mcraftorden.inventory.gui.GUIManager;
import com.mcraftorden.listeners.*;
import com.mcraftorden.managers.*;
import lombok.Getter;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

@Getter
public class McraftOrden extends JavaPlugin {
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private KingdomManager kingdomManager;
    private RoleManager roleManager;
    private LivesManager livesManager;
    private CombatManager combatManager;
    private LiveManager liveManager;
    private TabManager tabManager;
    private GUIManager guiManager;
    private LuckPerms luckPerms;

    @Override
    public void onEnable() {
        getLogger().info("McraftOrden wird geladen...");

        initializeManagers();
        registerCommands();
        registerListeners();
        startBelowBarTask();

        getLogger().info("McraftOrden wurde erfolgreich geladen!");
    }

    @Override
    public void onDisable() {
        getLogger().info("McraftOrden wird deaktiviert...");

        if (combatManager != null) {
            combatManager.cleanup();
        }

        for (Player player : Bukkit.getOnlinePlayers()) {
            if (livesManager != null) {
                livesManager.unloadPlayerData(player.getUniqueId());
            }
        }

        if (databaseManager != null) {
            databaseManager.close();
        }

        getLogger().info("McraftOrden wurde erfolgreich deaktiviert!");
    }

    private void initializeManagers() {
        try {
            this.luckPerms = LuckPermsProvider.get();
            getLogger().info("LuckPerms erfolgreich geladen!");
        } catch (IllegalStateException e) {
            getLogger().severe("LuckPerms konnte nicht geladen werden! Plugin wird deaktiviert.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        this.configManager = new ConfigManager(this);
        this.databaseManager = new DatabaseManager(this);
        this.kingdomManager = new KingdomManager(this);
        this.roleManager = new RoleManager(this);
        this.livesManager = new LivesManager(this);
        this.combatManager = new CombatManager(this);
        this.liveManager = new LiveManager(this);
        this.tabManager = new TabManager(this, luckPerms);
        this.guiManager = new GUIManager();

        getLogger().info("Alle Manager wurden erfolgreich initialisiert!");
    }

    private void registerCommands() {
        getCommand("mcraftorden").setExecutor(new McraftOrdenCommand(this));
        getCommand("mcorden").setExecutor(new StaffCommand(this));
        getCommand("setkingdomspawn").setExecutor(new SetKingdomSpawnCommand(this));
        getCommand("kspawn").setExecutor(new KSpawnCommand(this));
        getCommand("revive").setExecutor(new ReviveCommand(this));
        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("kchat").setExecutor(new KChatCommand(this));
        getCommand("live").setExecutor(new LiveCommand(this));

        getLogger().info("Alle Befehle wurden registriert!");
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        getLogger().info("Alle Listener wurden registriert!");
    }

    private void startBelowBarTask() {
        new BukkitRunnable() {
            @Override
            public void run() {
                if (!getConfig().getBoolean("pvp-lives.show-below-bar", true)) {
                    return;
                }

                for (Player player : Bukkit.getOnlinePlayers()) {
                    livesManager.updateBelowBarDisplay(player);
                }
            }
        }.runTaskTimer(this, 0L, 20L);

        getLogger().info("BelowBar-Task wurde gestartet!");
    }
}