DarrylDrag_Apply banner
DarrylDrag_Apply icon

DarrylDrag_Apply

After a player drags an item to another item, one dragged item is consumed, and a specific command is executed on the target item. If certain commands...

00
paperServer1.21.10mod

What was built

  • Server-side Paper plugin that lets players drag colored, named items onto another item to trigger a configured command while consuming part of the dragged stack.
  • The target item is temporarily treated as the player’s held item when the command runs, so commands that require a held item (e.g., /enchant) work on the clicked target.
  • Consumption and chance handling: the configured amount is taken from the cursor stack first; if a success-rate check fails the command is skipped and the target is unchanged.

How to use it

  • Configure draggable items in config.yml under the draggables list. Each entry supports:
    • name: display name to match (supports & color codes for matching).
    • command: command to run when dragged onto a target item.
    • consumed (default 1): how many of the dragged items to remove from the cursor.
    • success-rate (default 100): percent chance to run the command.
  • Placeholders available in commands: %player% (the clicking player) and %target% (target item display name or material).
  • A simple example is included in config.yml; edit or add entries to fit your items. Players must have the draggable item on their cursor and click a slot containing the target item.

Notes and limits

  • Matching requires the dragged item to have a display name; the color codes in that name must match the configured name.
  • Items are consumed before the success check; failed attempts still cost items but leave the target untouched.
  • The command executes as the player; permissions for the command still apply.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.