74hunna

make a paper plugin that adds 4/4 2v2 duels with a set of kits that are randomised where u can get a random kit when u go in the duel. make it where admins can edit these kits. make the kit guis contain where i can add armor offhand and the entire inventory. make a countdown when you are in for 3 seconds that shows text on the screen giving the darkness effect for 2 seconds. make the color of 3 and 2 green and 1 red.

Kodari AI
KodariMay 25 at 6:21 pm 17,315 (v2)

I’ll create a 2v2 duel arena plugin with randomized kits and a GUI-based kit editor.

DuelArena
A 2v2 arena dueling plugin with randomized kit selection. Features 4 concurrent arenas, customizable kits through an intuitive GUI editor, and automatic matchmaking. Admins can create and modify kits including armor, offhand, and inventory items. Players experience a cinematic countdown with effects before each match begins.

All files have been created! The plugin includes:

Core Features:

  • 4 concurrent 2v2 arenas with automatic matchmaking

  • Random kit selection from configured kits

  • 3-second countdown with green (3,2) and red (1) titles + darkness effect for 2 seconds

  • Full kit editor GUI with armor, offhand, and 36 inventory slots

Commands:

  • /duel - Join the queue

  • /duel leave - Leave arena

  • /kit - Open kit manager (requires duelarena.admin permission)

Kit Management:

  • Create/edit/delete kits through GUI

  • Left-click kit to edit

  • Shift+Right-click to delete

  • Slots 36-40 for helmet, chestplate, leggings, boots, and offhand

Configuration needed: You’ll need to set up arena spawn points in config.yml with the 4 arenas and their team spawn locations.

74hunna

can u change the command to say queue randomiser

Kodari AI
KodariMay 25 at 6:28 pm 7,340 (v2)

I’ll update the command from /duel to /queue randomiser.

Done! The command has been changed to /queue randomiser.

Commands now:

  • /queue randomiser or /queue - Join the randomiser queue

  • /queue leave - Leave the arena

All messages have been updated to mention “randomiser” instead of “duel” for consistency.

74hunna

where do i download the plugin

Kodari AI
KodariMay 25 at 6:43 pm 2,726 (v2)

You need to build the plugin from the source code. Here’s how:

Building the Plugin

  1. Open a terminal/command prompt in the project directory (where build.gradle is located)

  2. Run the Gradle build command:

    Shell
    ./gradlew build
    

    Or on Windows:

    Shell
    gradlew.bat build
    
  3. Find the compiled JAR file: After building completes, the plugin JAR will be located at:

    Plain Text
    build/libs/DuelArena-1.0.jar
    
  4. Install the plugin: Copy DuelArena-1.0.jar to your Paper server’s plugins/ folder

  5. Start your server and the plugin will be loaded


First-time setup after installing:

  1. Stop the server after first launch (config files will be generated)

  2. Edit plugins/DuelArena/config.yml to configure your 4 arena locations

  3. Restart the server

  4. Use /kit in-game to create your kits

  5. Players can then use /queue randomiser to join matches

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
22 1,298
src/main/java/com/duelarena/DuelPlugin.java
package com.duelarena;

import com.duelarena.arena.ArenaManager;
import com.duelarena.commands.DuelCommand;
import com.duelarena.commands.KitCommand;
import com.duelarena.inventory.gui.GUIListener;
import com.duelarena.inventory.gui.GUIManager;
import com.duelarena.kit.KitManager;
import com.duelarena.listeners.ChatListener;
import com.duelarena.listeners.DuelListener;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

@Getter
public class DuelPlugin extends JavaPlugin {
    
    private ArenaManager arenaManager;
    private KitManager kitManager;
    private GUIManager guiManager;
    
    private FileConfiguration kitsConfig;
    private Set<UUID> kitCreationQueue = new HashSet<>();
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        loadKitsConfig();
        
        this.arenaManager = new ArenaManager(this);
        this.kitManager = new KitManager(this);
        this.guiManager = new GUIManager();
        
        this.arenaManager.loadArenas();
        this.kitManager.loadKits();
        
        getCommand("queue").setExecutor(new DuelCommand(this));
        getCommand("kit").setExecutor(new KitCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new DuelListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ChatListener(this), this);
        
        getLogger().info("DuelArena enabled with " + arenaManager.getArenas().size() + " arenas and " + kitManager.getKits().size() + " kits");
    }
    
    @Override
    public void onDisable() {
        if (arenaManager != null) {
            arenaManager.shutdownAll();
        }
    }
    
    private void loadKitsConfig() {
        File kitsFile = new File(getDataFolder(), "kits.yml");
        if (!kitsFile.exists()) {
            saveResource("kits.yml", false);
        }
        this.kitsConfig = YamlConfiguration.loadConfiguration(kitsFile);
    }
    
    public void saveKitsConfig() {
        try {
            File kitsFile = new File(getDataFolder(), "kits.yml");
            kitsConfig.save(kitsFile);
        } catch (Exception e) {
            getLogger().severe("Failed to save kits.yml: " + e.getMessage());
        }
    }
}