mwgameryt._73669

Create a plugin

  • PaperMC / Spigot
  • Minecraft 1.21.11
  • Java 21

PLUGIN NAME:

Cardsmp

================================================== CARD ABILITIES

WARRIOR CARD

  • Material: RED_DYE
  • CMD: 1
  • card_type: "WARRIOR"

Duration: 25 seconds

Ability:

  • Summon Ravager companion near owner
  • Ravager follows owner passively
  • Ravager attacks players only
  • Ignore all mobs
  • Never attack owner

Combat Logic:

Passive until:

  • owner attacks player

OR

  • owner gets attacked

Then:

  • Ravager becomes hostile
  • Targets enemy players nearby

FX:

  • Dust shockwaves
  • Ground crack particles
  • Heavy stomp effects
  • Ravager roar sounds

End:

  • Remove Ravager instantly
  • Clear targets
  • Cancel tasks

==================================================

CHICKEN CARD

  • Material: WHITE_DYE
  • CMD: 2
  • card_type: "CHICKEN"

Cooldown: 30 seconds

Ability:

  • Spawn 10 chickens high in sky
  • Chickens fall rapidly toward ground
  • On touching ground:

- Instant HIGH POWER explosion - Chicken removed instantly

Explosion Rules:

  • No owner damage
  • Enemy damage only

FX:

  • Feather particle trails
  • Falling smoke particles
  • Explosion clouds
  • Chicken sounds

End:

  • Remove remaining chickens
  • Cancel all tasks

==================================================

HORSE CARD

  • Material: BROWN_DYE
  • CMD: 3
  • card_type: "HORSE"

Duration: 20 seconds

Ability:

  • Spawn fast rideable horse
  • Horse movement creates lightning trail
  • Lightning strikes follow previous path

Rules:

  • Lightning never damages owner
  • Horse movement speed boosted

FX:

  • Electric sparks
  • Thunder sounds
  • Speed dust particles

End:

  • Remove horse instantly
  • Stop lightning tasks

==================================================

FOX CARD

  • Material: ORANGE_DYE
  • CMD: 4
  • card_type: "FOX"

Duration: 20 seconds

Ability:

Freeze nearby enemy players completely.

Disable:

  • movement
  • jumping
  • attacking
  • item usage
  • inventory interaction
  • block interaction

Rules:

  • Owner excluded automatically

FX:

  • Snow particles
  • Frozen fog aura
  • Ice cracking sounds

End:

  • Restore all frozen players instantly
  • Clear freeze state

==================================================

BEE CARD

  • Material: YELLOW_DYE
  • CMD: 5
  • card_type: "BEE"

Ability:

  • Summon 6 bees around owner
  • Bees follow owner passively
  • Bees attack enemy players

Combat Logic:

Passive until:

  • owner attacks player

OR

  • owner gets attacked

Bee Attack:

  • Deal about 6 hearts damage
  • Remove 1 max heart from victim
  • Add 1 max heart to owner

Rules:

  • Bees ignore owner completely

FX:

  • Honey particles
  • Angry bee sounds
  • Yellow critical sparks

End:

  • Remove all bees instantly
  • Restore temporary heart states if needed

==================================================

PHANTOM CARD

  • Material: BLACK_DYE
  • CMD: 6
  • card_type: "PHANTOM"

Duration: 20 seconds

Ability:

  • Summon hostile phantoms
  • Phantoms circle owner passively

Combat Logic:

Passive until:

  • owner attacks player

OR

  • owner gets attacked

On phantom hit:

  • Teleport victim high into air
  • Apply aerial curse effect

Air Effect: 15 seconds

Rules:

  • Owner ignored completely

FX:

  • Dark smoke
  • End particles
  • Phantom screeches
  • Shadow aura

End:

  • Remove all phantoms instantly
  • Cancel air effects

==================================================

INFINITY CARD

  • Material: PURPLE_DYE
  • CMD: 7
  • card_type: "INFINITY"

Duration: 30 seconds

Ability:

  • Summon temporary dragon
  • Dragon flies around battlefield
  • Dragon attacks enemy players only

Combat Logic:

Passive until:

  • owner attacks player

OR

  • owner gets attacked

Dragon Attacks:

  • Dragon breath attack
  • Charge attacks
  • Roar shockwave

Rules:

  • Dragon NEVER damages owner
  • Dragon breath ignores owner
  • Prevent dragon persistence
  • Remove dragon instantly at end

FX:

  • Dragon breath particles
  • Purple energy waves
  • Massive roar sounds
  • Ground shake pulses

End:

  • Delete dragon instantly
  • Cancel dragon AI/tasks

================================================== CORE CARD SYSTEM

Cards are reusable special items.

Activation:

  • Right click activates ability
  • Use PlayerInteractEvent
  • Cancel default interaction
  • Cards are NEVER consumed

================================================== CARD SECURITY

Every card MUST contain:

  1. Material
  2. CustomModelData
  3. PDC "card_type"
  4. PDC "card_unique_id"

DO NOT identify cards using:

  • display names
  • lore

PDC:

Key: "card_unique_id"

Type:

STRING

Value:

UUID.randomUUID().toString()

Purpose:

  • Prevent dupe exploits
  • Prevent fake renamed items

All cards:

  • setUnbreakable(true)
  • reusable after cooldown

================================================== GLOBAL RULES

OWNER IMMUNITY:

Owner can NEVER be damaged by:

  • own mobs
  • own lightning
  • own explosions
  • own AoE
  • dragon breath
  • indirect effects

Before ANY damage:

IF victim UUID == owner UUID → cancel damage immediately

---

PASSIVE MOB SYSTEM:

Summoned mobs remain passive until:

  • owner attacks another player

OR

  • another player attacks owner

Before trigger:

  • follow owner only
  • no hostile targeting

After trigger:

  • attack enemy players

Applies to:

  • Ravager
  • Bees
  • Dragon
  • Phantoms

---

STRICT CLEANUP SYSTEM:

When timer ends:

  • remove entities
  • clear targets
  • cancel tasks
  • clear metadata
  • restore states
  • remove temporary effects

ZERO leftovers allowed.

================================================== COOLDOWN SYSTEM

Cooldown: 30 seconds for all cards

Storage:

Map<UUID, Long>

Cooldown persists through:

  • death
  • quit
  • world change

If cooldown active: player.sendActionBar( "§cCard Cooldown: §f{N}s" )

================================================== TASK RULES

ALL BukkitRunnable tasks MUST use:

CORRECT: int ticks = 0;

WRONG: run() { int ticks = 0; }

================================================== COMMAND SYSTEM

Main Command: /cardsmp INVENTORY GUI

Permission: cardsmp.INVENTORY GUI

================================================== INVENTORY GUI SYSTEM

Open: 27-slot inventory INVENTORY GUI

Title: "§6Cards SMP"

Layout:

Slot 10 → WARRIOR Slot 11 → CHICKEN Slot 12 → HORSE Slot 13 → FOX Slot 14 → BEE Slot 15 → PHANTOM Slot 16 → INFINITY

================================================== INVENTORY GUI INTERACTION

When player clicks card:

  1. Cancel InventoryClickEvent
  2. Give selected card
  3. Play click sound

Prevent:

  • stealing INVENTORY GUI items
  • moving INVENTORY GUI items
  • dragging INVENTORY GUI items
  • dropping INVENTORY GUI items

================================================== MANDATORY CLEANUP EVENTS

On:

  • PlayerQuitEvent
  • PlayerDeathEvent
  • PlayerChangedWorldEvent
  • Plugin disable

Immediately:

  • cancel tasks
  • remove mobs
  • restore states
  • clear temporary maps

================================================== OUTPUT RULES

DISABLE:

  • player.sendMessage(...)
  • Bukkit.broadcastMessage(...)
  • debug spam

ONLY ALLOW: player.sendActionBar(...)

Allowed for:

  • cooldown warnings
  • short status notifications
mwgameryt._73669

Continue why you stop

Kodari AI
KodariJun 3 at 7:04 pm 1

What would you like me to build? Give me a description of the plugin — its purpose, key features, and any specific mechanics — and I’ll generate the full project from scratch.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code