magic wand banner
magic wand icon

magic wand

can move items and blocks just by clicking them and can change mobs from hostile to friendly and can kill things

00
paperServer1.21.10mod

Magic Wand Plugin Notes

  • Adds a /magicwand command that gives players a glowing Magic Wand item. The wand stores a marker in its data so only that rod triggers powers.
  • Move blocks by sneaking and right-clicking any block to store it, then right-click a block face to place the stored block in the adjacent space. Each player tracks one stored block at a time.
  • Right-click dropped items with the wand to pull them directly into your inventory (overflow is dropped at your feet).
  • Right-click hostile mobs to pacify them: they become frozen, renamed to "Friendly <mob>", stop targeting players, and are prevented from retargeting.
  • Sneak + click (right-click or left-click attack) any non-player mob with the wand to instantly slay it with particles and sound.

Implementation details

  • Friendly mobs are tagged via a persistent data key; targeting attempts are canceled in EntityTargetLivingEntityEvent, and their AI is disabled when pacified.
  • Block moving stores the clicked block's BlockData string and removes the original block; placement recreates that data at the target space after occupancy checks.
  • Player-specific stored blocks are cleared when the player disconnects to avoid stale data.

Limitations & ideas

  • Block inventories (chests, barrels, etc.) are not preserved when moved; only the block data is carried.
  • Only one block can be stored per player at a time, and the wand does not yet honor permissions or cooldowns.
  • Pacified mobs are frozen in place; if you want them to wander, consider re-enabling AI with a follow-up command or timer in a future update.