hairoxyt

Create a Minecraft Lifesteal plugin where players can start a duel by typing /duel.

The duel should only work inside the Lifesteal realm.

When two players duel, they are teleported to a special duel arena to fight.

As soon as one player dies, the duel ends and both players are teleported back to spawn after 5 minutes.

Make sure no other players can interfere during the duel.

Kodari AI
KodariFeb 27 at 4:55 pm 7,860 (v2)

I’ll create a Lifesteal duel plugin with arena-based combat and player isolation.

LifestealDuels
A competitive duel system for Lifesteal servers where players can challenge each other to arena-based combat. Players must be in the Lifesteal realm to initiate duels. Upon acceptance, both players are teleported to an isolated duel arena where they fight without interference. When a player dies, both combatants wait 5 minutes before being teleported back to spawn. Features duel requests, arena protection, and automatic cleanup systems.

Plugin created! Here’s what was implemented:

Core Features:

  • /duel <player> to challenge players (only in Lifesteal realm)

  • /duel accept/deny to respond to challenges

  • Automatic teleportation to arena after 5-second countdown

  • Death detection ends the duel immediately

  • 5-minute wait before both players teleport to spawn

  • Full interference protection (other players can’t damage duelists)

  • Arena boundary enforcement (players can’t teleport out during duels)

  • Request timeout system (60 seconds by default)

  • Keep inventory on death during duels

  • Automatic cleanup on disconnect

Configuration includes:

  • Spawn and arena locations

  • Lifesteal realm name

  • All timing settings (delays, timeouts)

  • Fully customizable messages

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 637
src/main/java/com/lifestealduels/LifestealDuels.java
package com.lifestealduels;

import com.lifestealduels.commands.DuelCommand;
import com.lifestealduels.listeners.DuelListener;
import com.lifestealduels.managers.DuelManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LifestealDuels extends JavaPlugin {

    private DuelManager duelManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.duelManager = new DuelManager(this);

        getCommand("duel").setExecutor(new DuelCommand(this));
        getServer().getPluginManager().registerEvents(new DuelListener(this), this);

        getLogger().info("LifestealDuels has been enabled!");
    }

    @Override
    public void onDisable() {
        if (duelManager != null) {
            duelManager.cleanupAll();
        }
        getLogger().info("LifestealDuels has been disabled!");
    }
}