finn_the_real_31553

MOrden Plugin

Create a Paper / Spigot Minecraft plugin called McOrden.

Target version:

Minecraft 1.20+

The plugin is designed for Minecraft PvP event projects where players are divided into kingdoms and fight until one kingdom wins.

The plugin must be:

• modular • highly configurable • INVENTORY GUI-based administration • optimized for large events • stable with many players • compatible with LuckPerms, PlaceholderAPI, and Paper

All messages must be German and configurable.

---

GLOBAL MESSAGE PREFIX

Every plugin message starts with:

&5McOrden 》

Example:

&5McOrden 》&cDu hast ein Leben verloren!

---

COLOR SYSTEM

The plugin must support both legacy colors and hex colors.

Supported examples:

&a &c &5 &#AA00FF

These colors must work everywhere:

• chat • INVENTORY GUI titles • INVENTORY GUI lore • bossbars • scoreboards • TAB list • action bars

All messages must pass through a color parser system.

---

ROLE SYSTEM

Three roles exist:

Player General King

Each role has different attributes.

---

PLAYER

Default role.

Health: 10 hearts

PvP Lives: 2 lives

TAB Icon: 👤

---

GENERAL

Second role.

Health: 13 hearts

PvP Lives: 2 lives

TAB Icon: ⚔

---

KING

Leader of a kingdom.

Health: 15 hearts

PvP Lives: 3 lives

TAB Icon: 👑

---

SPECIAL RULE FOR KINGS

The last life of a king can only be taken by another king.

Example:

King has 1 life left.

If a normal player kills him, the king does not lose the final life.

Only a king vs king kill removes the last life.

---

PVP LIVES SYSTEM

Each player has PvP lives.

These lives represent how many PvP deaths they can have before elimination.

Example:

Player with 2 lives

Death 1 → lives = 1 Death 2 → lives = 0 → player banned

When a player reaches 0 lives:

• player is banned • broadcast message appears

Ban message:

Du hast alle deine Herzen verloren wir sehen uns beim nächsten Projekt

This must be configurable in:

messages.yml

---

TEAM KILL PROTECTION

Players from the same kingdom cannot remove lives from each other.

Example:

Plains player kills another Plains player.

Result:

The death happens normally, but:

• the victim does NOT lose a life

This prevents griefing inside kingdoms.

---

HEART DISPLAY SYSTEM

Players must see their PvP lives displayed above the hotbar.

Example display:

❤❤ ❤❤❤

The plugin should try to display purple hearts.

If Minecraft limitations prevent that:

Use red hearts as fallback.

The heart display must update instantly when:

• a player loses a life • an admin adds lives • a role changes

---

KINGDOM SYSTEM

There are 6 fixed kingdoms.

Plains Pilz Canyon Eis Jungle Berg

Each kingdom has:

• unique color • spawn location • member list • alliances

Players cannot choose kingdoms.

Admins must assign them.

---

KINGDOM COMMANDS

Admin commands:

/kingdom assign <player> <kingdom>

/kingdom remove <player>

/kingdom setspawn <kingdom>

King command:

/kingdom setspawn

Player command:

/kingdom spawn

---

ALLIANCE SYSTEM

Each kingdom can have maximum 2 alliances.

Kings can manage alliances through a INVENTORY GUI.

Command:

/alliance

The INVENTORY GUI allows:

• sending alliance requests • accepting alliance requests • removing alliances

---

COMBAT SYSTEM

When players attack each other they enter combat mode.

During combat:

• a bossbar timer appears • players cannot safely log out

---

COMBAT TIMER SYSTEM

Combat starts with:

20 seconds.

When players hit each other:

There is a random chance to increase the timer.

Possible increases:

+5 seconds +10 seconds +15 seconds

But it does not happen every hit.

Maximum timer limit:

150 seconds.

Bossbar example:

&cIm Kampf! &7Noch 35 Sekunden

---

COMBAT LOG SYSTEM

If a player logs out while in combat:

The plugin will:

• kill the player • remove one PvP life

Server message example:

&5McOrden 》&c%player% ist im Kampf geflohen!

---

ADMIN IMMUNITY

Admins are immune to combat logging punishment.

Permission:

mcorden.admin

Admins logging out during combat:

• do not die • do not lose lives

---

LOOTDROP SYSTEM

Admins can spawn lootdrops.

Command:

/lootdrop spawn

When executed:

  1. A chicken spawns high in the sky
  2. The chicken slowly falls toward the ground
  3. When it reaches the ground:

• the chicken disappears • a barrel or chest appears

The container contains random configured loot.

When the container becomes empty:

It disappears automatically.

---

LOOTDROP CONFIGURATION INVENTORY GUI

Command:

/lootdrop

This opens the lootdrop editor INVENTORY GUI.

Admins can:

• add items • remove items • set random chance • configure drop amounts

The plugin must ensure:

A loot container always spawns, even if the chicken dies early.

---

GLOBAL SERVER EVENTS

Admins can apply potion effects to the entire server.

Command:

/event <effect> <level> <duration>

Example:

/event speed 2 300

All players receive Speed II for 300 seconds.

---

FINALE EVENT

Admins can start the finale.

Command:

/finale start

Finale features:

• shrinking world border • finale bossbar • finale scoreboard

Maximum duration:

2 hours.

Border must stop around:

20–30 blocks.

Commands:

/finale stop

/finale shrink <ticks>

/finale setborder <size>

---

FINALE SCOREBOARD

During the finale a scoreboard shows:

• players alive • kingdoms alive • eliminated kingdoms

Example:

McOrden Finale

Plains: 3 Pilz: 2 Canyon: ❌ Eis: 1 Jungle: 2 Berg: 1

---

TAB SYSTEM

TAB must show detailed information.

Format:

LuckPerms Prefix → Role Icon → Kingdom → Player Name

Example:

[Admin] 👑 [Plains] Trayzo [Mod] ⚔ [Jungle] Steve [Player] 👤 [Pilz] Alex

Sorting priority:

Kings Generals Players

TAB header must show:

Online players / Max players

Example:

24 / 100

---

LIVE MODE SYSTEM

The plugin includes a LIVE indicator system.

Command:

/live on /live off

Permission:

mcorden.admin

---

LIVE MODE BEHAVIOR

When enabled:

TAB header displays:

🔴 [LIVE]

Example:

🔴 [LIVE] | 32 / 100 Spieler Online

The red dot must appear before [LIVE].

When disabled:

The LIVE indicator disappears.

---

MAIN ADMIN INVENTORY GUI

Command:

/mcorden admin

Permission:

mcorden.admin

Sections inside INVENTORY GUI:

Player Management Lives Management Role Management Kingdom Management LootDrop Management Event Management Finale Management Reload Config

---

LIVES MANAGEMENT

Admins can modify PvP lives.

Commands:

/lives set <player> <amount>

/lives add <player> <amount>

/lives remove <player> <amount>

Admin INVENTORY GUI also allows:

Left click → add life Right click → remove life Shift click → reset to default

---

ROLE MANAGEMENT INVENTORY GUI

Admins can change roles.

Role selector INVENTORY GUI items:

Iron Sword → Player

Diamond Sword → General

Nether Star → King

When role changes:

• health updates • PvP lives update • TAB icon updates

---

STAFF MODERATION INVENTORY GUI

Command:

/staff

Permission:

mcorden.staff

Moderation tools include:

Teleport Freeze player Vanish Clear chat

---

FREEZE SYSTEM

Command:

/freeze <player>

Frozen players cannot:

• move • attack • break blocks • run commands

Running the command again unfreezes them.

---

VANISH SYSTEM

Command:

/vanish

Staff becomes invisible.

Effects:

• hidden from TAB • silent join/quit • players cannot see staff

---

CLEAR CHAT

Command:

/clearchat

Clears chat for all players.

Broadcast message:

&5McOrden 》&7Der Chat wurde von einem Moderator geleert.

---

TELEPORT SYSTEM

Admins can teleport to:

Players Kingdom spawns World spawn Offline players

Offline teleport command:

/tpoffline <player>

Teleports to last saved location.

---

FIRST JOIN SPAWN SYSTEM

Teleportation only happens on first join.

If player has kingdom:

Teleport to kingdom spawn.

If player has no kingdom:

Teleport to world spawn.

Returning players are not teleported automatically.

---

DATABASE SYSTEM

The plugin must support:

SQLite (default)

MySQL (optional)

Stored data:

• player lives • roles • kingdom • last location

---

CONFIG FILE STRUCTURE

plugins/McOrden/

config.yml messages.yml kingdoms.yml roles.yml lives.yml combat.yml alliances.yml lootdrop.yml events.yml finale.yml tab.yml spawn.yml database.yml

---

PERFORMANCE REQUIREMENTS

The plugin must:

• cache player data • use async database queries • support large player events

Kodari AI
KodariMar 12 at 7:11 pm 17,237 (v2)

I’ll create the McOrden plugin - a comprehensive PvP event system with kingdoms, roles, lives tracking, and extensive admin tools.

McOrden
A comprehensive Paper/Spigot plugin for Minecraft PvP kingdom events where players fight in 6 kingdoms with role-based systems (Player/General/King), PvP lives tracking, alliance management, combat logging, lootdrops, finale events with shrinking borders, TAB integration, staff moderation tools, and GUI-based administration. Features German messages, LuckPerms integration, async database support (SQLite/MySQL), and optimized performance for large-scale events.

Plan

  • Core plugin structure with 15+ managers for modular functionality

  • GUI framework for all admin interfaces using inventory-based system

  • Data layer with async database (SQLite/MySQL) and caching

  • German messages with legacy + hex color support

  • Combat system with random timer increases and combat logging

  • Kingdom system with 6 fixed kingdoms and alliance management

  • Role system affecting health and lives (special king vs king rule)

  • Finale event with shrinking borders and scoreboard

  • TAB integration with LuckPerms, role icons, and LIVE mode

  • Staff tools (freeze, vanish, teleport, clear chat)

Now I’ll create the manager classes:

Due to the large size of this plugin, I’ll continue with the remaining managers in the next part. The core infrastructure is now in place with config loading, database management, and player data handling.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
69 3,724
src/main/java/com/mcorden/McOrden.java
package com.mcorden;

import com.mcorden.command.*;
import com.mcorden.inventory.gui.GUIListener;
import com.mcorden.inventory.gui.GUIManager;
import com.mcorden.listener.*;
import com.mcorden.manager.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class McOrden extends JavaPlugin {
    
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private PlayerDataManager playerDataManager;
    private KingdomManager kingdomManager;
    private RoleManager roleManager;
    private LivesManager livesManager;
    private AllianceManager allianceManager;
    private CombatManager combatManager;
    private LootDropManager lootDropManager;
    private EventManager eventManager;
    private FinaleManager finaleManager;
    private TabManager tabManager;
    private LiveModeManager liveModeManager;
    private FreezeManager freezeManager;
    private VanishManager vanishManager;
    private SpawnManager spawnManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.configManager.loadConfigs();
        
        this.databaseManager = new DatabaseManager(this);
        this.databaseManager.initialize();
        
        this.playerDataManager = new PlayerDataManager(this);
        this.kingdomManager = new KingdomManager(this);
        this.roleManager = new RoleManager(this);
        this.livesManager = new LivesManager(this);
        this.allianceManager = new AllianceManager(this);
        this.combatManager = new CombatManager(this);
        this.lootDropManager = new LootDropManager(this);
        this.eventManager = new EventManager(this);
        this.finaleManager = new FinaleManager(this);
        this.tabManager = new TabManager(this);
        this.liveModeManager = new LiveModeManager(this);
        this.freezeManager = new FreezeManager(this);
        this.vanishManager = new VanishManager(this);
        this.spawnManager = new SpawnManager(this);
        this.guiManager = new GUIManager();
        
        registerListeners();
        registerCommands();
        
        this.combatManager.startCleanupTask();
        
        getLogger().info("McOrden has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.combatManager != null) {
            this.combatManager.cleanup();
        }
        if (this.finaleManager != null) {
            this.finaleManager.stop();
        }
        if (this.databaseManager != null) {
            this.databaseManager.close();
        }
        
        getLogger().info("McOrden has been disabled!");
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerMoveListener(this), this);
    }
    
    private void registerCommands() {
        getCommand("mcorden").setExecutor(new McOrdenCommand(this));
        getCommand("kingdom").setExecutor(new KingdomCommand(this));
        getCommand("alliance").setExecutor(new AllianceCommand(this));
        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("lootdrop").setExecutor(new LootDropCommand(this));
        getCommand("event").setExecutor(new EventCommand(this));
        getCommand("finale").setExecutor(new FinaleCommand(this));
        getCommand("live").setExecutor(new LiveCommand(this));
        getCommand("freeze").setExecutor(new FreezeCommand(this));
        getCommand("vanish").setExecutor(new VanishCommand(this));
        getCommand("clearchat").setExecutor(new ClearChatCommand(this));
        getCommand("staff").setExecutor(new StaffCommand(this));
        getCommand("tpoffline").setExecutor(new TpOfflineCommand(this));
    }
}