erizsssy

Item Details The custom item should be a Wither Rose.

Display Name: §4 Reaper's Coin Lore: §7Mark a player for death. §7Deal §c20% extra damage §7to them. §7Duration: §e15 seconds §7Cooldown: §e3 minutes Restrictions The Wither Rose cannot be planted or placed under any circumstances.

Right-clicking the item activates its ability instead of placing it.

The item should not be consumed when used.

Command Command: /reapercoin Permission: OP only.

When executed by an OP, it gives them 1 Reaper's Coin.

Non-OP players should receive a message saying they do not have permission.

Ability: Death Mark

When a player right-clicks with the Reaper's Coin:

The plugin should do the effect on the player that the user right clicks on "§cNo target found." If a valid player is found:

Apply a Death Mark for 15 seconds.

The marked player should have the Glowing effect for the entire duration.

Send the user: "§4☠ You have marked <player> for death!" Send the target: "§c☠ You have been marked for death!" Damage Bonus While a player is marked:

The player who used the Reaper's Coin deals 20% extra damage to the marked target.

Example: 10 damage becomes 12 damage.

The bonus only applies between the marker and their marked target.

Other players should not receive the damage bonus.

Cooldown Cooldown: 180 seconds (3 minutes).

Cooldown is tracked per player.

If a player tries to use the item while on cooldown:

Cancel the activation.

Send: "§cReaper's Coin is on cooldown for <remaining time> seconds." End of Mark

After 15 seconds:

Remove the glowing effect.

Remove the Death Mark.

Send the user: "§7Death Mark on <player> has expired." Send the target: "§7The Death Mark has faded." Technical Requirements Minecraft version: latest Paper/Spigot API.

Efficient cooldown management.

Proper cleanup on player disconnects.

Prevent exploits or duplication.

Use persistent item identification so renamed Wither Roses do not gain the ability.

The plugin should compile without errors and be production-ready.

Kodari AI
KodariJun 11 at 12:16 pm 8
ReaperCoin
A custom item plugin featuring the Reaper's Coin — a Wither Rose that marks players for death. Right-clicking targets a nearby player, applying a 15-second Death Mark with Glowing effect and 20% bonus damage to the marker's attacks. Includes a 3-minute cooldown per player, persistent item identification via PDC, and proper cleanup on disconnect. Grants the item via /reapercoin (OP only).

Plan:

  1. ReaperCoinPlugin — main class, registers everything

  2. ReaperCoinItem — item creation + PDC identification

  3. DeathMarkManager — cooldown/mark tracking, expiry scheduling

  4. ReaperCoinListener — block place cancel, right-click ability, damage bonus, disconnect cleanup

  5. ReaperCoinCommand — /reapercoin give command

  6. plugin.yml + build.gradle

Here’s what was built:

  • PDC identification — the Wither Rose is tagged with a NamespacedKey on creation; renaming or copying the item without that tag grants no ability.

  • Block place prevention — BlockPlaceEvent is cancelled for any PDC-tagged coin, preventing placement in all circumstances.

  • Right-click ability — fires on both air and block right-clicks; PlayerInteractEntityEvent is also cancelled so entity interactions don’t slip through.

  • Nearest-player targeting — scans within a 6-block sphere and picks the closest player, sending §cNo target found. if none exist.

  • Death Mark + Glowing — tracked in DeathMarkManager with a BukkitTask expiry at 15 seconds; both marker and target receive the correct expiry messages.

  • 20% damage bonus — applied in EntityDamageByEntityEvent only when the attacker is the exact marker of the victim.

  • Cooldown — stored as an epoch-ms timestamp; remaining time is shown in whole seconds on blocked attempts.

  • Disconnect cleanup — PlayerQuitEvent clears both outgoing and incoming marks, cancels tasks, and removes Glowing from affected parties.

erizsssy

it says an unexpected error occured when doing the command

Kodari AI
KodariJun 11 at 12:39 pm 5

ReaperCoinItem.init(plugin) is never called in onEnable(), so namespacedKey is null when create() tries to use it — that’s the crash. Fix:

Also need the import:

ReaperCoinItem.init(this) was missing from onEnable(), leaving namespacedKey as null. This caused a NullPointerException the moment the command tried to tag the item’s PDC. Should work correctly now.

erizsssy

still doesnt work the server is paper 1.21.11

Kodari AI
KodariJun 11 at 12:45 pm 7

The root problems are clear:

  1. XSeries is missing from build.gradle — the code imports it but it’s not declared as a dependency, so the jar has no XSeries classes at runtime → crash

  2. Wrong API — using spigot-api:1.20.4 instead of Paper 1.21.1

  3. api-version in plugin.yml is 1.20 instead of 1.21

XSeries was imported throughout the code but never bundled into the jar — Paper would throw NoClassDefFoundError the moment the command tried to create the item. The fixes:

  • build.gradle — switched to paper-api:1.21.1, added implementation for XSeries so it gets bundled, bumped Java target to 21, added jar bundling task

  • plugin.yml — api-version updated to 1.21

Rebuild and drop the new jar in your plugins folder — should work now.

erizsssy

when marked make it 10% more dmg UPDATE EVERYWHERE

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 424
src/main/java/com/kodari/reapercoin/ReaperCoinPlugin.java
package com.kodari.reapercoin;

import com.kodari.reapercoin.command.ReaperCoinCommand;
import com.kodari.reapercoin.item.ReaperCoinItem;
import com.kodari.reapercoin.listener.ReaperCoinListener;
import com.kodari.reapercoin.manager.DeathMarkManager;
import org.bukkit.plugin.java.JavaPlugin;

public class ReaperCoinPlugin extends JavaPlugin {

    private DeathMarkManager deathMarkManager;

    @Override
    public void onEnable() {
        deathMarkManager = new DeathMarkManager(this);

        ReaperCoinItem.init(this);

        getServer().getPluginManager().registerEvents(new ReaperCoinListener(this), this);
        getCommand("reapercoin").setExecutor(new ReaperCoinCommand(this));
    }

    @Override
    public void onDisable() {
        deathMarkManager.cancelAll();
    }

    public DeathMarkManager getDeathMarkManager() {
        return deathMarkManager;
    }
}