furkanle1

Create a complete, production-ready Minecraft Java Paper plugin named "LetilBattle".

TARGET:

  • Paper Minecraft 1.21.x
  • Java 21
  • Plugin name: LetilBattle
  • Main package: com.letilbattle
  • Build a real working .jar, not just example code.
  • The final plugin must compile successfully with Maven.

GAME MODE:

This is a battle-royale survival game based around a custom item called "Letil".

LETIL SYSTEM:

  • Every player starts with exactly 10 Letil items.
  • Letil should be a clearly recognizable custom item named "§b§lLetil".
  • Players can pick Letil items up from the ground.
  • Letil items can stack.
  • When a player kills another player, exactly 1 Letil is dropped from the dead player.
  • The killer can pick that Letil up.
  • A player can therefore have more than 10 Letil.
  • Every time a player dies, remove exactly 1 Letil from their inventory and drop that Letil at their death location.
  • If a player has 0 Letil remaining, they are eliminated permanently and cannot respawn/rejoin the active match.
  • Do not accidentally remove multiple Letils from a death.
  • Track active/eliminated players safely.

BORDER:

  • Create a large WorldBorder centered around the world's spawn point.
  • Initial border should be approximately 2500 blocks wide.
  • Every 20 minutes the border must shrink.
  • Make the shrink noticeable but gradual.
  • Never shrink below approximately 50 blocks.
  • Announce each border shrink to all players.
  • Players outside the border should receive normal Minecraft border damage/behavior.
  • The game ends when only one active player remains.
  • Announce the winner prominently.

RANDOM LETIL SPAWNS:

  • Periodically spawn individual Letil items at random safe locations inside the current WorldBorder.
  • Spawn them on the highest safe block, not underground or inside blocks.
  • Keep spawning them throughout the match.
  • Do not spawn them outside the current border.

LETIL MARKET INVENTORY GUI:

When a player RIGHT-CLICKS a Letil item, open a chest-style inventory INVENTORY GUI instead of simply doing nothing.

Title: "§b§lLETIL MARKET"

The INVENTORY GUI must contain these purchasable abilities/items:

  1. FLIGHT
  • Cost: 3 Letil.
  • INVENTORY GUI item name: "§bUçuş"
  • Description: "§710 saniye uçuş"
  • When purchased, give the player flight for exactly 10 seconds.
  • Show a visible countdown/action-bar message during flight.
  • After flight ends, disable flight unless the player normally has permission to fly.
  • Flight cooldown: 3 minutes.
  • During cooldown, the INVENTORY GUI item must show the remaining cooldown.
  • Do not allow purchase while cooling down.
  1. INVISIBILITY
  • Cost: 2 Letil.
  • INVENTORY GUI item name: "§7Görünmezlik"
  • Duration: exactly 4 seconds.
  • Apply real Minecraft invisibility.
  • Show cooldown in the INVENTORY GUI.
  • Cooldown: exactly 1 minute.
  • Do not allow purchase while cooling down.
  1. FULL DIAMOND ARMOR
  • Cost: 5 Letil.
  • INVENTORY GUI item name: "§bFull Elmas Set"
  • Purchase gives:

Diamond Helmet Diamond Chestplate Diamond Leggings Diamond Boots

  • Do not duplicate armor incorrectly.
  • If inventory is full, handle the purchase safely.
  1. SHARPNESS V IRON SWORD
  • Cost: 3 Letil.
  • INVENTORY GUI item name: "§fKeskinlik V Demir Kılıç"
  • Give one Iron Sword enchanted with Sharpness V.
  • Handle inventory-full situations safely.
  1. SUPER JUMP
  • Cost: 3 Letil.
  • INVENTORY GUI item name: "§aSüper Zıplama"
  • This is a toggleable permanent ability after purchase.
  • Player can turn it ON and OFF whenever they want.
  • When enabled, jumping should launch the player approximately 5 blocks high.
  • The special jump must prevent all fall damage caused by that special jump.
  • Normal jumps/fall damage must remain normal.
  • Show the current state (ON/OFF) in the INVENTORY GUI.
  • Do not require repeatedly spending Letil after purchasing it.

INVENTORY GUI BEHAVIOR:

  • Clicking a purchase item must safely check the player's Letil balance.
  • If insufficient Letil, show a clear message.
  • On successful purchase, remove the exact required number of Letil.
  • The INVENTORY GUI should update immediately.
  • Prevent item duplication/exploits.
  • Prevent taking the INVENTORY GUI's display items out of the inventory.
  • Right-clicking the Letil item itself opens the INVENTORY GUI.
  • Normal left-click behavior should not accidentally activate the market.
  • Add useful visual formatting and item lore.

GAME COMMANDS:

Add: /letil start /letil stop /letil spawn /letil info /letil give <player> <amount>

Commands should require OP/permission: letilbattle.admin

/letil start:

  • Start/reset a match.
  • Give every participating player exactly 10 Letil.
  • Reset eliminations.
  • Reset cooldowns.
  • Reset border to its starting size.
  • Announce match start.

/letil stop:

  • Stop the active match safely.

/letil spawn:

  • Spawn one random Letil inside the current border.

/letil info:

  • Show the player's current Letil count and ability cooldowns.

DATA / SAFETY:

  • Store active player state safely.
  • Clean up cooldowns when players leave.
  • Prevent exploits from inventory clicks, death drops, reconnects, and INVENTORY GUI interactions.
  • Do not depend on external plugins.
  • Use only the Paper API.
  • Use persistent data / item metadata so normal Nether Stars cannot be mistaken for Letil.
  • Avoid deprecated APIs where possible.
  • Make the plugin reload-safe as much as possible.
  • Include plugin.yml.
  • Include pom.xml.
  • Organize code into multiple clean Java classes if appropriate.
  • Add comments explaining important game logic.

IMPORTANT:

This must be a COMPLETE WORKING PLUGIN.

Do not give me pseudocode.

Do not give me a tutorial.

Generate all required Java files, plugin.yml and pom.xml.

Compile the project.

Fix compilation errors automatically.

Return the final compiled LetilBattle.jar.

Kodari AI
KodariAug 22 at 10:47 am 3
  1. Create the Maven/Paper project metadata and plugin descriptor.

  2. Implement Letil item identity, match lifecycle, border shrinking, random spawning, deaths, eliminations, and winner handling.

  3. Implement the market inventory GUI and transactional ability purchases.

  4. Add flight, invisibility, armor, sword, and persistent super-jump ability management.

  5. Register commands/listeners and lifecycle cleanup for a production-ready plugin.

Created the complete LetilBattle Maven/Paper plugin with:

  • Letil item identity using persistent metadata

  • Match start/stop/reset lifecycle

  • 10 Letils per participant

  • Death-based Letil loss and elimination

  • Letil drops and random safe-world spawning

  • Shrinking 2500-block world border with announcements

  • Winner detection

  • Letil Market GUI

  • Flight, invisibility, diamond armor, Sharpness V sword, and toggleable super jump

  • Cooldowns, action-bar countdowns, inventory safety, and GUI anti-stealing protection

  • /letil start|stop|spawn|info|give

  • Admin permissions

  • Paper 1.21.x Maven configuration

  • plugin.yml

Files created under com.letilbattle, with pom.xml and plugin.yml included. The project is ready for Maven compilation; the environment does not provide a build tool or compiled artifact attachment, so I cannot truthfully claim a .jar was generated here.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
10 1,180
src/main/java/com/letilbattle/LetilBattlePlugin.java
package com.letilbattle;

import com.letilbattle.command.LetilCommand;
import com.letilbattle.game.GameManager;
import com.letilbattle.item.LetilItemFactory;
import com.letilbattle.market.MarketManager;
import com.letilbattle.ability.AbilityManager;
import com.letilbattle.listener.BattleListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class LetilBattlePlugin extends JavaPlugin {
    private LetilItemFactory itemFactory;
    private AbilityManager abilityManager;
    private GameManager gameManager;
    private MarketManager marketManager;

    @Override
    public void onEnable() {
        this.itemFactory = new LetilItemFactory(this);
        this.abilityManager = new AbilityManager(this, itemFactory);
        this.gameManager = new GameManager(this, itemFactory, abilityManager);
        this.marketManager = new MarketManager(this, itemFactory, gameManager, abilityManager);

        BattleListener listener = new BattleListener(gameManager, marketManager, abilityManager, itemFactory);
        Bukkit.getPluginManager().registerEvents(listener, this);

        LetilCommand command = new LetilCommand(gameManager, itemFactory, abilityManager);
        if (getCommand("letil") != null) {
            getCommand("letil").setExecutor(command);
            getCommand("letil").setTabCompleter(command);
        }
    }

    @Override
    public void onDisable() {
        if (gameManager != null) {
            gameManager.stopMatch(false);
        }
        if (abilityManager != null) {
            abilityManager.shutdown();
        }
    }

    public GameManager getGameManager() {
        return gameManager;
    }

    public MarketManager getMarketManager() {
        return marketManager;
    }
}