turoscsusza

Create a Minecraft Paper plugin for version 1.21.10 with this functionality:

Command /macestart Only OP players can use it (player.isOp()) Event Start Select a random online player Give them: 1 Mace 1 Wind Charge with infinite usage Always appears as 1 item Automatically replaces itself when used Broadcast: "PLAYERNAME has received the Mace!" Gameplay If the Mace holder is killed by a player:

Killer gets the Mace + infinite Wind Charge Remove items from the dead player Broadcast: "PLAYERNAME has received the Mace!" Timer Event lasts 20 minutes Event End Remove items from current holder Broadcast: "PLAYERNAME has won the event!" Requirements Only one holder at a time Prevent item duplication or dropping Handle:

Player quit → transfer or end event safely Non-player death → items stay in system Use proper Paper API Include:

Main class Command Listeners (death, quit, etc.) 20-min scheduler

Kodari AI
KodariApr 24 at 4:07 pm 7,009 (v2)

I’ll create a competitive Mace event plugin where players battle for a powerful item set.

MaceEvent
A competitive PvP event plugin where one player receives a Mace and infinite Wind Charge. When killed by another player, the items transfer to the killer. Event runs for 20 minutes with automatic winner announcement. Features item drop protection, duplication prevention, and safe handling of player disconnects during active events.

Project created with complete implementation.

Structure:

  • Main plugin class with event manager initialization

  • EventManager handles state, 20-minute timer, and infinite wind charge restoration

  • Command executor checks OP status before starting event

  • Event listener prevents drops, inventory transfers, and handles death/quit scenarios

Key mechanics:

  • Wind charge auto-replenishes via tick-based task that monitors holder’s inventory

  • Special lore tags identify event items to prevent duplication

  • Death transfers items only if killed by another player

  • Player quit or non-player death safely ends event

  • All items removed from drops and inventory on transfer/end

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Mace
Code
7 404
src/main/java/com/example/maceevent/MaceEvent.java
package com.example.maceevent;

import com.example.maceevent.commands.MaceStartCommand;
import com.example.maceevent.listeners.EventListener;
import org.bukkit.plugin.java.JavaPlugin;

public class MaceEvent extends JavaPlugin {
    private EventManager eventManager;
    
    @Override
    public void onEnable() {
        this.eventManager = new EventManager(this);
        
        this.getCommand("macestart").setExecutor(new MaceStartCommand(this.eventManager));
        
        this.getServer().getPluginManager().registerEvents(new EventListener(this.eventManager), this);
        
        this.getLogger().info("MaceEvent plugin enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.eventManager.isEventActive()) {
            this.eventManager.endEvent(false);
        }
        this.getLogger().info("MaceEvent plugin disabled!");
    }
    
    public EventManager getEventManager() {
        return this.eventManager;
    }
}