notmeeditz_47642

I need a Minecraft plugin where players who have set each other as PvP partners can use /pvp to challenge each other. Once both players are online and accept the PvP match, they should automatically be teleported to a PvP arena. The game mode should be selected automatically.

  1. /pvp <player> – Send a PvP challenge to your PvP partner.
  2. Both players must be online.
  3. Once the challenge is accepted, both players are automatically teleported to the PvP arena.
  4. Auto Gamemode – The gamemode is automatically selected according to the arena settings.
  5. After the match ends, both players return to their previous locations and gamemodes.
  6. Support for multiple PvP matches simultaneously.
Kodari AI
KodariMon at 3:54 pm 1
PvPDuelArena
A Minecraft plugin enabling PvP partner duels. Players set each other as partners and use /pvp &lt;player&gt; to challenge. Both must be online; upon acceptance, both are teleported to a configured PvP arena with an auto-selected gamemode. Supports multiple simultaneous matches. After the match concludes, players are returned to their pre-duel locations and gamemodes, ensuring seamless restoration. Includes challenge management, arena configuration, and match lifecycle handling.
  • Add /pvp <player> challenges plus accept/deny and mutual partner-management commands.

  • Add configurable arenas with per-arena gamemodes, concurrent match reservations, and return-to-previous-state handling.

  • Add plugin metadata and build configuration.

Created the PvP partner plugin with mutual partner registration, challenge/accept/deny commands, per-arena gamemodes, and support for simultaneous matches. Players return to their saved locations and gamemodes when a match ends; deaths and disconnects also end the match.

Set up each arena in config.yml with its world, gamemode, and two spawn locations. Players must each run /pvp partner <player> to make the partnership mutual, then challenge with /pvp <player>. If no arena is configured or available, the challenge won’t start.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 719
src/main/java/com/kodari/pvppartners/PvpPartnersPlugin.java
package com.kodari.pvppartners;

import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

public final class PvpPartnersPlugin extends JavaPlugin {
    private PartnerManager partnerManager;
    private ArenaManager arenaManager;
    private MatchManager matchManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        partnerManager = new PartnerManager(this);
        arenaManager = new ArenaManager(this);
        matchManager = new MatchManager(this, partnerManager, arenaManager);

        PvpCommand command = new PvpCommand(this);
        getCommand("pvp").setExecutor(command);
        getCommand("pvp").setTabCompleter(command);
        getServer().getPluginManager().registerEvents(matchManager, this);

        getLogger().info("Loaded " + arenaManager.getArenaCount() + " PvP arena(s).");
    }

    @Override
    public void onDisable() {
        if (matchManager != null) {
            matchManager.shutdown();
        }
        if (partnerManager != null) {
            partnerManager.save();
        }
    }

    public PartnerManager getPartnerManager() {
        return partnerManager;
    }

    public MatchManager getMatchManager() {
        return matchManager;
    }

    public void message(CommandSender recipient, String message) {
        recipient.sendMessage(ChatColor.translateAlternateColorCodes('&', "&8[&cPvP&8] &r" + message));
    }
}