Paper Plugin Guide
File mode0

Projects

Project: Magic wand

A custom item with data components and PDC, a right-click spell, particles, sounds, a cooldown and a recipe.

IntermediateProject, about 1 min read

This page is still being written.

What it will cover

  • Custom item creation with data components (name, lore, glint, rarity, item model optional) and a PDC tag
  • Right-click detection with PlayerInteractEvent (hand check, action types)
  • Spell: launch a projectile or a particle beam with ray tracing (world.rayTraceEntities or player.rayTraceBlocks) and damage
  • Cooldown with the client-side cooldown visual
  • Shaped crafting recipe for the wand
  • Give command for admins
  • Step-by-step build, testing, extension exercises
  • Final project: plugins/project-magic-wand