mayank099166

Royal SMP Crown Plugin (Paper 1.21.x)

Create a high-quality Minecraft Paper plugin for Paper 1.21.x.

General System

There are 10 unique Crowns represented as custom Nether Stars.

Available Crowns:

  1. Healing Crown
  2. Lightning Crown
  3. Fire Crown
  4. Wind Crown
  5. Water Crown
  6. Shadow Crown
  7. Speed Crown
  8. Ice Crown
  9. Void Crown
  10. Soul Crown

Every Crown should have:

* Custom Name * Custom Lore * CustomModelData support * Enchanted Glow * Configurable Resource Pack support

---

Crown Ownership

* Every player can own only ONE Crown. * A player automatically receives their assigned Crown on first join. * Crown ownership is permanently saved. * Crowns cannot duplicate. * Crowns always stay with the original owner. * Crowns remain after server restart.

---

Crown Protection

The Crown must:

* Never drop on death. * Never drop with Q or Ctrl+Q. * Never be picked up by another player. * Never be stolen. * Never disappear. * Never burn. * Never explode. * Never fall into the void permanently. * Never enter any chest. * Never enter shulker boxes. * Never enter hoppers. * Never enter droppers. * Never enter dispensers. * Never enter furnaces. * Never enter smithing tables. * Never enter crafting tables. * Never enter anvils. * Never enter grindstones. * Never enter bundles. * Never be renamed. * Never be repaired. * Never be enchanted. * Never be upgraded. * Never be destroyed.

The owner MUST be able to freely move the Crown between any inventory slot or hotbar slot.

The Crown must NOT be locked to any fixed inventory slot.

If the Crown disappears for any reason it must instantly return to its owner.

---

Crown Appearance

Every Crown is a Nether Star.

Requirements:

* Enchanted Glow * CustomModelData support

DO NOT CREATE

* Armor Stands * Display Entities * Floating Crowns * Orbiting Crowns * Rotating Crowns * Spinning Entities * Particles around player * Holograms * Constant animations

The plugin must create ZERO continuous visual effects.

Everything should be optimized for performance.

---

First Join Animation

When a player joins for the FIRST TIME ONLY:

Play a beautiful cinematic Crown Spin animation in the center of the screen.

Requirements:

* Plays only once ever. * Never plays again. * Duration configurable. * Sound configurable. * Title configurable. * Subtitle configurable.

After this intro there should be NO animations anywhere.

---

Crown Abilities

Every Crown has exactly 3 abilities.

Activation:

TAB

HOLD RIGHT CLICK

CROUCH + TAB

Everything must be configurable.

Cooldowns

Damage

Potion Levels

Potion Duration

Messages

Sounds

Particles (optional)

---

Healing Crown

TAB

* Regeneration II (10s)

Cooldown: 35s

HOLD

* 4 Absorption Hearts (20s)

Cooldown: 60s

CROUCH + TAB

* Full Health * Full Hunger

Cooldown: 120s

---

Lightning Crown

TAB

* Speed III (8s)

Cooldown: 35s

HOLD

* Lightning Strike * Damages enemies * No Fire

Cooldown: 60s

CROUCH + TAB

* Jump Boost (~20 Blocks) * Speed V (10s)

Cooldown: 120s

---

Fire Crown

TAB

* Fire Resistance (10s)

Cooldown: 30s

HOLD

* Fireball * 2 Hearts Damage * No Fire Spread

Cooldown: 60s

CROUCH + TAB

* Fire Aspect on all melee hits for 15 seconds

Cooldown: 120s

---

Wind Crown

TAB

* No Fall Damage (10s)

Cooldown: 30s

HOLD

* Teleport/Dash up to 50 Blocks

Cooldown: 60s

CROUCH + TAB

* Unlimited Wind Burst (20s)

Cooldown: 120s

---

Water Crown

TAB

* Dolphin's Grace (10s)

Cooldown: 30s

HOLD

* Water Blast * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Water Breathing (2 min)

Cooldown: 120s

---

Shadow Crown

TAB

* Invisibility (8s)

Cooldown: 35s

HOLD

* Shadow Slash * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* 2 Shadow Clones * No Damage * Confuse Enemies * Player gets Invisibility + Speed I

Cooldown: 120s

---

Speed Crown

TAB

* Speed II

Cooldown: 30s

HOLD

* Slowness III to target

Cooldown: 60s

CROUCH + TAB

* Teleport 20 Blocks * Speed II

Cooldown: 120s

---

Ice Crown

TAB

* Heal

Cooldown: 35s

HOLD

* Ice Shard * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Full Hunger * Resistance I * Fire Resistance

Cooldown: 120s

---

Void Crown

TAB

* Night Vision

Cooldown: 30s

HOLD

* Void Orb * 2 Hearts Damage * Blindness

Cooldown: 60s

CROUCH + TAB

* Nearby enemies:

* Blindness II * Weakness I

Player:

* Resistance I

Cooldown: 120s

---

Soul Crown

TAB

* Glowing

Cooldown: 30s

HOLD

* Soul Bolt * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Resistance I * 4 Absorption Hearts * Remove all negative effects

Cooldown: 120s

---

Cooldown Display

Instead of scoreboards, boss bars or particles, display cooldowns using the Action Bar above the XP Bar.

Example:

code
Ability I: 35 | Ability II: 60 | Ability III: 120

Requirements:

* Updates every second. * Only visible while a cooldown is active. * Automatically disappears when all cooldowns finish. * Fully configurable.

---

Commands

code
/crowngive-healing <player>
/crowngive-lightning <player>
/crowngive-fire <player>
/crowngive-wind <player>
/crowngive-water <player>
/crowngive-shadow <player>
/crowngive-speed <player>
/crowngive-ice <player>
/crowngive-void <player>
/crowngive-soul <player>
code
/crownremove-healing <player>
/crownremove-lightning <player>
/crownremove-fire <player>
/crownremove-wind <player>
/crownremove-water <player>
/crownremove-shadow <player>
/crownremove-speed <player>
/crownremove-ice <player>
/crownremove-void <player>
/crownremove-soul <player>
code
/crownsee <player>

---

Configuration

Everything must be editable inside config.yml:

* Cooldowns * Damage * Potion Effects * Durations * Messages * Sounds * Crown Names * Lore * Glow * Model Data * Action Bar Format * Intro Animation

No code changes required.

---

Player Data

Create YAML files storing:

* UUID * Player Name * Crown * Cooldowns * First Join * Last Seen

---

Performance

Plugin must be highly optimized.

Requirements:

* No ArmorStand spam. * No Display Entity spam. * No permanent repeating animations. * No unnecessary scheduled tasks. * No memory leaks. * Fully optimized for Paper 1.21.x. * Stable for large SMP servers. * Prioritize performance over visual effects.

This version keeps all 10 crowns and their abilities, allows the owner to move the crown anywhere within their own inventory, removes all continuous animations around players, shows cooldowns in the action bar above the XP bar, and includes only a one-time cinematic crown intro when a player first joins.

IMPORTANT: The plugin must compile successfully on Paper 1.21.x (Java 21) without any compilation errors.

Use ONLY official Paper API classes and methods that exist in Paper 1.21.x.

Do NOT use non-existent, removed, deprecated, or imaginary events such as ItemBurnEvent or any other invalid Bukkit/Paper API classes.

If a feature (such as preventing crowns from burning in fire or lava) cannot be implemented using a valid event, use another official Paper API method that achieves the same result.

Before generating the final code, verify that every import, event, class, method, and package exists in the Paper 1.21.x API.

The final project must compile successfully without any missing symbols, invalid imports, or API compatibility issues. Do not generate placeholder code or unimplemented classes. Only generate production-ready Java code that builds successfully.

mayank099166

Royal SMP Crown Plugin (Paper 1.21.x)

Create a high-quality Minecraft Paper plugin for Paper 1.21.x.

General System

There are 10 unique Crowns represented as custom Nether Stars.

Available Crowns:

  1. Healing Crown
  2. Lightning Crown
  3. Fire Crown
  4. Wind Crown
  5. Water Crown
  6. Shadow Crown
  7. Speed Crown
  8. Ice Crown
  9. Void Crown
  10. Soul Crown

Every Crown should have:

* Custom Name * Custom Lore * CustomModelData support * Enchanted Glow * Configurable Resource Pack support

---

Crown Ownership

* Every player can own only ONE Crown. * A player automatically receives their assigned Crown on first join. * Crown ownership is permanently saved. * Crowns cannot duplicate. * Crowns always stay with the original owner. * Crowns remain after server restart.

---

Crown Protection

The Crown must:

* Never drop on death. * Never drop with Q or Ctrl+Q. * Never be picked up by another player. * Never be stolen. * Never disappear. * Never burn. * Never explode. * Never fall into the void permanently. * Never enter any chest. * Never enter shulker boxes. * Never enter hoppers. * Never enter droppers. * Never enter dispensers. * Never enter furnaces. * Never enter smithing tables. * Never enter crafting tables. * Never enter anvils. * Never enter grindstones. * Never enter bundles. * Never be renamed. * Never be repaired. * Never be enchanted. * Never be upgraded. * Never be destroyed.

The owner MUST be able to freely move the Crown between any inventory slot or hotbar slot.

The Crown must NOT be locked to any fixed inventory slot.

If the Crown disappears for any reason it must instantly return to its owner.

---

Crown Appearance

Every Crown is a Nether Star.

Requirements:

* Enchanted Glow * CustomModelData support

DO NOT CREATE

* Armor Stands * Display Entities * Floating Crowns * Orbiting Crowns * Rotating Crowns * Spinning Entities * Particles around player * Holograms * Constant animations

The plugin must create ZERO continuous visual effects.

Everything should be optimized for performance.

---

First Join Animation

When a player joins for the FIRST TIME ONLY:

Play a beautiful cinematic Crown Spin animation in the center of the screen.

Requirements:

* Plays only once ever. * Never plays again. * Duration configurable. * Sound configurable. * Title configurable. * Subtitle configurable.

After this intro there should be NO animations anywhere.

---

Crown Abilities

Every Crown has exactly 3 abilities.

Activation:

TAB

HOLD RIGHT CLICK

CROUCH + TAB

Everything must be configurable.

Cooldowns

Damage

Potion Levels

Potion Duration

Messages

Sounds

Particles (optional)

---

Healing Crown

TAB

* Regeneration II (10s)

Cooldown: 35s

HOLD

* 4 Absorption Hearts (20s)

Cooldown: 60s

CROUCH + TAB

* Full Health * Full Hunger

Cooldown: 120s

---

Lightning Crown

TAB

* Speed III (8s)

Cooldown: 35s

HOLD

* Lightning Strike * Damages enemies * No Fire

Cooldown: 60s

CROUCH + TAB

* Jump Boost (~20 Blocks) * Speed V (10s)

Cooldown: 120s

---

Fire Crown

TAB

* Fire Resistance (10s)

Cooldown: 30s

HOLD

* Fireball * 2 Hearts Damage * No Fire Spread

Cooldown: 60s

CROUCH + TAB

* Fire Aspect on all melee hits for 15 seconds

Cooldown: 120s

---

Wind Crown

TAB

* No Fall Damage (10s)

Cooldown: 30s

HOLD

* Teleport/Dash up to 50 Blocks

Cooldown: 60s

CROUCH + TAB

* Unlimited Wind Burst (20s)

Cooldown: 120s

---

Water Crown

TAB

* Dolphin's Grace (10s)

Cooldown: 30s

HOLD

* Water Blast * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Water Breathing (2 min)

Cooldown: 120s

---

Shadow Crown

TAB

* Invisibility (8s)

Cooldown: 35s

HOLD

* Shadow Slash * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* 2 Shadow Clones * No Damage * Confuse Enemies * Player gets Invisibility + Speed I

Cooldown: 120s

---

Speed Crown

TAB

* Speed II

Cooldown: 30s

HOLD

* Slowness III to target

Cooldown: 60s

CROUCH + TAB

* Teleport 20 Blocks * Speed II

Cooldown: 120s

---

Ice Crown

TAB

* Heal

Cooldown: 35s

HOLD

* Ice Shard * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Full Hunger * Resistance I * Fire Resistance

Cooldown: 120s

---

Void Crown

TAB

* Night Vision

Cooldown: 30s

HOLD

* Void Orb * 2 Hearts Damage * Blindness

Cooldown: 60s

CROUCH + TAB

* Nearby enemies:

* Blindness II * Weakness I

Player:

* Resistance I

Cooldown: 120s

---

Soul Crown

TAB

* Glowing

Cooldown: 30s

HOLD

* Soul Bolt * 2 Hearts Damage

Cooldown: 60s

CROUCH + TAB

* Resistance I * 4 Absorption Hearts * Remove all negative effects

Cooldown: 120s

---

Cooldown Display

Instead of scoreboards, boss bars or particles, display cooldowns using the Action Bar above the XP Bar.

Example:

code
Ability I: 35 | Ability II: 60 | Ability III: 120

Requirements:

* Updates every second. * Only visible while a cooldown is active. * Automatically disappears when all cooldowns finish. * Fully configurable.

---

Commands

code
/crowngive-healing <player>
/crowngive-lightning <player>
/crowngive-fire <player>
/crowngive-wind <player>
/crowngive-water <player>
/crowngive-shadow <player>
/crowngive-speed <player>
/crowngive-ice <player>
/crowngive-void <player>
/crowngive-soul <player>
code
/crownremove-healing <player>
/crownremove-lightning <player>
/crownremove-fire <player>
/crownremove-wind <player>
/crownremove-water <player>
/crownremove-shadow <player>
/crownremove-speed <player>
/crownremove-ice <player>
/crownremove-void <player>
/crownremove-soul <player>
code
/crownsee <player>

---

Configuration

Everything must be editable inside config.yml:

* Cooldowns * Damage * Potion Effects * Durations * Messages * Sounds * Crown Names * Lore * Glow * Model Data * Action Bar Format * Intro Animation

No code changes required.

---

Player Data

Create YAML files storing:

* UUID * Player Name * Crown * Cooldowns * First Join * Last Seen

---

Performance

Plugin must be highly optimized.

Requirements:

* No ArmorStand spam. * No Display Entity spam. * No permanent repeating animations. * No unnecessary scheduled tasks. * No memory leaks. * Fully optimized for Paper 1.21.x. * Stable for large SMP servers. * Prioritize performance over visual effects.

This version keeps all 10 crowns and their abilities, allows the owner to move the crown anywhere within their own inventory, removes all continuous animations around players, shows cooldowns in the action bar above the XP bar, and includes only a one-time cinematic crown intro when a player first joins.

IMPORTANT: The plugin must compile successfully on Paper 1.21.x (Java 21) without any compilation errors.

Use ONLY official Paper API classes and methods that exist in Paper 1.21.x.

Do NOT use non-existent, removed, deprecated, or imaginary events such as ItemBurnEvent or any other invalid Bukkit/Paper API classes.

If a feature (such as preventing crowns from burning in fire or lava) cannot be implemented using a valid event, use another official Paper API method that achieves the same result.

Before generating the final code, verify that every import, event, class, method, and package exists in the Paper 1.21.x API.

The final project must compile successfully without any missing symbols, invalid imports, or API compatibility issues. Do not generate placeholder code or unimplemented classes. Only generate production-ready Java code that builds successfully.

Kodari AI
KodariJun 17 at 5:41 pm 152
RoyalCrowns
A premium Paper 1.21.x SMP plugin featuring 10 unique Crown items (Healing, Lightning, Fire, Wind, Water, Shadow, Speed, Ice, Void, Soul). Each Crown has 3 configurable abilities triggered via F key, right-click, and Sneak+F. Crowns are fully protected — they never drop, burn, despawn, or enter containers. Cooldowns display on the action bar. Player data persists in YAML. A one-time cinematic intro plays on first crown assignment.

Now I need to fix the PlayerRespawnEvent handler — it has a clunky plugin lookup. Let me patch that:I see — the files were listed but not actually written. Let me create all of them now with full content.


RoyalCrowns is complete. Here’s a summary of every system:

Architecture

Class
Role
CrownItem
Creates Nether Star items with PDC tags, glow, custom model data
CrownManager
Gives/removes crowns, recovery task every 2s, world scan every 5min
CooldownManager
Tracks per-player cooldowns by expiry timestamp; persists across restarts
AbilityManager
All 30 ability implementations + fire-aspect/no-fall state tracking
ActionBarManager
Sends cooldown bar every second, disappears when all ready
PlayerDataManager
YAML per-player files (
plugins/RoyalCrowns/players/UUID.yml
)

Crown Protections

  • Death — stripped from drops in PlayerDeathEvent; returned on respawn

  • Drop — cancelled via PlayerDropItemEvent

  • Pickup — non-owners blocked via EntityPickupItemEvent

  • Hopper/dispenser/dropper — blocked via InventoryMoveItemEvent

  • Inventory placement — full InventoryClickEvent + InventoryDragEvent guard on external containers (chests, anvils, furnaces, shulkers, bundles, grindstones, etc.)

  • Fire/lava/explosions — EntityDamageEvent on Item entities cancelled

  • Despawn — ItemDespawnEvent cancelled

  • Rename/repair — PrepareAnvilEvent clears result

  • Crafting slots — prevented from entering 2×2 grid (would drop on close)

Ability Triggers

  • F key (not sneaking) → Ability I

  • Right-click air (holding crown in hand) → Ability II

  • Sneak + F key → Ability III

First-join Intro

Plays once per player (first login after crown assignment): title + subtitle + sound, all configurable.

mayank099166

Where is download file

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
19 2,322
src/main/java/com/royalsmp/crowns/RoyalCrowns.java
package com.royalsmp.crowns;

import com.royalsmp.crowns.ability.AbilityManager;
import com.royalsmp.crowns.ability.ActionBarManager;
import com.royalsmp.crowns.ability.CooldownManager;
import com.royalsmp.crowns.command.CrownCommandHandler;
import com.royalsmp.crowns.config.ConfigManager;
import com.royalsmp.crowns.crown.CrownItem;
import com.royalsmp.crowns.crown.CrownManager;
import com.royalsmp.crowns.data.PlayerDataManager;
import com.royalsmp.crowns.listener.AbilityListener;
import com.royalsmp.crowns.listener.CrownProtectionListener;
import com.royalsmp.crowns.listener.PlayerJoinListener;
import com.royalsmp.crowns.listener.ProjectileListener;
import lombok.Getter;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public class RoyalCrowns extends JavaPlugin {

    @Getter private ConfigManager configManager;
    @Getter private PlayerDataManager playerDataManager;
    @Getter private CrownItem crownItem;
    @Getter private CooldownManager cooldownManager;
    @Getter private CrownManager crownManager;
    @Getter private ActionBarManager actionBarManager;
    @Getter private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        // Init in dependency order
        configManager = new ConfigManager(this);
        cooldownManager = new CooldownManager();
        playerDataManager = new PlayerDataManager(this, cooldownManager);
        crownItem = new CrownItem(this);
        crownManager = new CrownManager(this, playerDataManager, crownItem, cooldownManager);
        abilityManager = new AbilityManager(this, crownManager, cooldownManager, configManager, crownItem);
        actionBarManager = new ActionBarManager(this, cooldownManager, configManager, crownManager);

        // Start background tasks
        crownManager.startTasks();
        actionBarManager.start();

        // Register listeners
        getServer().getPluginManager().registerEvents(
                new CrownProtectionListener(this, crownItem, crownManager), this);
        getServer().getPluginManager().registerEvents(
                new PlayerJoinListener(this, crownManager, playerDataManager, configManager), this);
        getServer().getPluginManager().registerEvents(
                new AbilityListener(abilityManager, crownManager, crownItem), this);
        getServer().getPluginManager().registerEvents(
                new ProjectileListener(this, abilityManager), this);

        // Register commands
        CrownCommandHandler commandHandler = new CrownCommandHandler(this, crownManager, playerDataManager);
        for (CrownType type : CrownType.values()) {
            registerCommand("crowngive-" + type.getKey(), commandHandler);
            registerCommand("crownremove-" + type.getKey(), commandHandler);
        }
        registerCommand("crownsee", commandHandler);

        getLogger().info("RoyalCrowns enabled — 10 Crowns loaded.");
    }

    @Override
    public void onDisable() {
        if (actionBarManager != null) actionBarManager.shutdown();
        if (abilityManager != null) abilityManager.shutdown();
        if (crownManager != null) crownManager.shutdown();
        if (playerDataManager != null) playerDataManager.saveAll();
        getLogger().info("RoyalCrowns disabled — all data saved.");
    }

    private void registerCommand(String name, CrownCommandHandler handler) {
        PluginCommand cmd = getCommand(name);
        if (cmd != null) {
            cmd.setExecutor(handler);
        }
    }
}