Iydkdoy Fukfkydou

Create a complete, buildable PaperMC plugin named CrownBreaker for Minecraft Java Edition 26.2. Verify the exact Paper API version and compatible Java version before building.

  1. Custom Crown Breaker Mace

Create a legendary custom mace named CROWN BREAKER with:

  • Attack Damage: 6
  • Attack Speed: 0.6
  • Unbreakable.
  • Golden-and-purple appearance with a glowing purple particle effect.
  • Custom item lore displaying all abilities.
  • A unique persistent item identifier so ordinary maces cannot use these abilities.
  1. Add the exact 3×3 crafting recipe

Register a shaped crafting recipe in the crafting table using this layout:

Slot| Ingredient Top-left| Diamond Block Top-middle| Diamond Block Top-right| Diamond Block Middle-left| Blaze Rod Middle-middle| Nether Star Middle-right| Blaze Rod Bottom-left| Gold Block Bottom-middle| Netherite Block Bottom-right| Gold Block

Recipe pattern:

"DDD"

"BNB"

"GNG"

Where:

  • "D" = Diamond Block
  • "B" = Blaze Rod
  • "N" = Netherite Block
  • "G" = Gold Block

Use the Nether Star as a special central ingredient in the middle row. Important: Make the ingredient mapping match the written layout exactly: the actual middle row is Blaze Rod, Nether Star, Blaze Rod; the bottom row is Gold Block, Netherite Block, Gold Block.

Crafting must produce the custom Crown Breaker item, not a vanilla mace. Prevent duplicate or incorrect recipe outputs, and register the recipe when the plugin enables.

  1. Commands
  • "/crownbreaker" — give the executing player the Crown Breaker.
  • "/crownbreaker give <player>" — give it to another player.
  • "/crownbreaker recipe" — display the crafting recipe in chat.
  • "/crownbreaker reload" — reload the configuration.
  • "/crownbreaker help" — show commands and abilities.

Add configurable permissions for obtaining the weapon and using administrative commands. Handle full inventories safely.

  1. Sky Launcher
  • Activation: Shift + right-click with Crown Breaker.
  • Launch the player 30 blocks upward.
  • Cooldown: 10 seconds.
  • Add purple particles and sound effects.
  1. Water Dash
  • Activation: Right-click while in water or rain.
  • Dash forward with a strong velocity boost.
  • Cooldown: 5 seconds.
  • Add blue particles and water sound effects.
  1. Soul Reaper Ultimate
  • Charge by successfully landing mace smash attacks.
  • Maximum charge: 25/25.
  • Activation: Shift + left-click when fully charged.
  • Deal 100 damage to valid nearby living entities in a configurable 7×7 area.
  • Add purple-and-red soul particles and sound effects.
  • Reset charge after activation and prevent repeated activation from one click.
  1. Technical requirements
  • Use the correct Paper API, Gradle, and Java toolchain for the target version.
  • Implement crafting with Bukkit/Paper recipe registration.
  • Implement abilities with appropriate server-side event handling.
  • Include "plugin.yml", "config.yml", source code, Gradle wrapper, and all required files.
  • Ensure recipe ingredients are consumed correctly and the custom output retains its unique identifier and lore.
  • Build the plugin into "CrownBreaker.jar" using "./gradlew build".
  • Provide the complete source project ZIP and installation instructions.
  • Test the build before claiming it works; do not fabricate successful compilation results.

The final plugin must let players craft Crown Breaker using the specified recipe or obtain it using "/crownbreaker" if they have permission.

Kodari AI
KodariOct 13 at 11:40 am 20
CrownBreaker
A PaperMC plugin adding a legendary Crown Breaker mace with custom crafting, Sky Launcher, Water Dash, and Soul Reaper abilities. Features configurable cooldowns, particle effects, permissions, and a GUI-free command system for obtaining the weapon and managing plugin settings.

I’ll check the Paper API version for 26.2 first, then write the files.

I checked the Paper API: the latest stable 26.2 build is 26.2.build.133-stable. Sources also agree 26.2 needs Java 25 or newer,

so the toolchain is set to 25. I’m creating the project files now.

* Begin Patch * Add File: settings.gradle +rootProject.name = ‘CrownBreaker’ * Add File: build.gradle +plugins {

  • id ‘java’ +}

+group = ‘com.example’ +version = ‘1.0.0’ + +java {

  • toolchain {

  • Plain Text
       languageVersion = JavaLanguageVersion.of(25)
    
  • } +}

+repositories {

+dependencies {

  • compileOnly ‘io.papermc.paper:paper-api:26.2.build.133-stable’ +}

+tasks.withType(JavaCompile).configureEach {

  • options.encoding = ‘UTF-8’ +}

+jar {

  • archiveFileName = ‘CrownBreaker.jar’ +} * Add File: src/main/resources/plugin.yml +name: CrownBreaker +version: 1.0.0 +main: com.example.crownbreaker.CrownBreakerPlugin +api-version: ‘26.2’ +author: Kodari +description: Legendary Crown Breaker mace with Sky Launcher, Water Dash and the Soul Reaper ultimate. +commands:

  • crownbreaker:

  • description: Crown Breaker commands

  • usage: ‘/<command> [give <player>|recipe|reload|help]’

  • aliases: [cb] +permissions:

  • crownbreaker.obtain:

  • description: Receive the Crown Breaker yourself

  • default: op

  • crownbreaker.admin:

  • description: Give the Crown Breaker to others and reload the configuration

  • default: op * Add File: src/main/resources/config.yml +# Crown Breaker configuration. Apply changes with /crownbreaker reload.

+permissions:

  • Required to receive the Crown Breaker yourself with /crownbreaker

  • obtain: crownbreaker.obtain

  • Required for /crownbreaker give <player> and /crownbreaker reload

  • admin: crownbreaker.admin

+weapon:

  • attack-damage: 6.0

  • attack-speed: 0.6

+sky-launcher:

  • Upward velocity. About 2.68 lifts a player roughly 30 blocks.

  • launch-velocity: 2.68

  • cooldown-seconds: 10

  • Fall damage from the launch is cancelled for this long after activation

  • fall-protection-seconds: 15

+water-dash:

  • dash-strength: 2.2

  • upward-boost: 0.15

  • cooldown-seconds: 5

+soul-reaper:

  • max-charge: 25

  • damage: 100.0

  • Horizontal side length of the square area centred on the player (7 = 7x7)

  • area-size: 7

  • Blocks checked above and below the player

  • vertical-range: 3.0 * Add File: src/main/java/com/example/crownbreaker/CrownBreakerPlugin.java +package com.example.crownbreaker;

+import com.example.crownbreaker.ability.AbilityListener; +import com.example.crownbreaker.ability.SoulReaperListener; +import com.example.crownbreaker.command.CrownBreakerCommand; +import com.example.crownbreaker.config.ConfigManager; +import com.example.crownbreaker.effects.CrownGlowTask; +import com.example.crownbreaker.item.CrownItemFactory; +import com.example.crownbreaker.recipe.CrownRecipeManager; +import lombok.Getter; +import org.bukkit.command.PluginCommand; +import org.bukkit.plugin.java.JavaPlugin; + +@Getter +public final class CrownBreakerPlugin extends JavaPlugin { +

  • private ConfigManager configManager;

  • private CrownItemFactory itemFactory;

  • private CrownRecipeManager recipeManager;

  • @Override

  • public void onEnable() {

  • Plain Text
       saveDefaultConfig();
    
  • Plain Text
       configManager = new ConfigManager(this);
    
  • Plain Text
       configManager.reload();
    
  • Plain Text
       itemFactory = new CrownItemFactory(this);
    
  • Plain Text
       recipeManager = new CrownRecipeManager(this);
    
  • Plain Text
       recipeManager.register();
    
  • Plain Text
       getServer().getPluginManager().registerEvents(recipeManager, this);
    
  • Plain Text
       getServer().getPluginManager().registerEvents(new AbilityListener(this), this);
    
  • Plain Text
       getServer().getPluginManager().registerEvents(new SoulReaperListener(this), this);
    
  • Plain Text
       CrownBreakerCommand command = new CrownBreakerCommand(this);
    
  • Plain Text
       PluginCommand pluginCommand = getCommand("crownbreaker");
    
  • Plain Text
       if (pluginCommand != null) {
    
  • Plain Text
           pluginCommand.setExecutor(command);
    
  • Plain Text
           pluginCommand.setTabCompleter(command);
    
  • }

  • Plain Text
       new CrownGlowTask(this).runTaskTimer(this, 20L, 10L);
    
  • Plain Text
       getLogger().info("CrownBreaker enabled.");
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/config/ConfigManager.java +package com.example.crownbreaker.config;

+import com.example.crownbreaker.CrownBreakerPlugin; +import lombok.Getter; +import org.bukkit.configuration.file.FileConfiguration; + +@Getter +public class ConfigManager { +

  • private final CrownBreakerPlugin plugin;

  • private String obtainPermission;

  • private String adminPermission;

  • private double attackDamage;

  • private double attackSpeed;

  • private double skyLaunchVelocity;

  • private int skyCooldownSeconds;

  • private int skyFallProtectionSeconds;

  • private double dashStrength;

  • private double dashUpwardBoost;

  • private int dashCooldownSeconds;

  • private int maxCharge;

  • private double ultimateDamage;

  • private int ultimateAreaSize;

  • private double ultimateVerticalRange;

  • public ConfigManager(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • }

  • public void reload() {

  • Plain Text
       plugin.reloadConfig();
    
  • Plain Text
       FileConfiguration cfg = plugin.getConfig();
    
  • Plain Text
       obtainPermission = cfg.getString("permissions.obtain", "crownbreaker.obtain");
    
  • Plain Text
       adminPermission = cfg.getString("permissions.admin", "crownbreaker.admin");
    
  • Plain Text
       attackDamage = cfg.getDouble("weapon.attack-damage", 6.0);
    
  • Plain Text
       attackSpeed = cfg.getDouble("weapon.attack-speed", 0.6);
    
  • Plain Text
       skyLaunchVelocity = cfg.getDouble("sky-launcher.launch-velocity", 2.68);
    
  • Plain Text
       skyCooldownSeconds = cfg.getInt("sky-launcher.cooldown-seconds", 10);
    
  • Plain Text
       skyFallProtectionSeconds = cfg.getInt("sky-launcher.fall-protection-seconds", 15);
    
  • Plain Text
       dashStrength = cfg.getDouble("water-dash.dash-strength", 2.2);
    
  • Plain Text
       dashUpwardBoost = cfg.getDouble("water-dash.upward-boost", 0.15);
    
  • Plain Text
       dashCooldownSeconds = cfg.getInt("water-dash.cooldown-seconds", 5);
    
  • Plain Text
       maxCharge = cfg.getInt("soul-reaper.max-charge", 25);
    
  • Plain Text
       ultimateDamage = cfg.getDouble("soul-reaper.damage", 100.0);
    
  • Plain Text
       ultimateAreaSize = cfg.getInt("soul-reaper.area-size", 7);
    
  • Plain Text
       ultimateVerticalRange = cfg.getDouble("soul-reaper.vertical-range", 3.0);
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/util/Text.java +package com.example.crownbreaker.util;

+import org.bukkit.ChatColor; + +public final class Text { +

  • private Text() {

  • }

  • public static String color(String input) {

  • Plain Text
       return ChatColor.translateAlternateColorCodes('&', input);
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/util/Compat.java +package com.example.crownbreaker.util;

+import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; +import com.cryptomorin.xseries.particles.XParticle; +import org.bukkit.Color; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Particle; +import org.bukkit.World; +import org.bukkit.inventory.ItemStack; + +public final class Compat { +

  • private Compat() {

  • }

  • public static Material material(String name) {

  • Plain Text
       return XMaterial.matchXMaterial(name).map(XMaterial::parseMaterial).orElse(null);
    
  • }

  • public static ItemStack item(String name) {

  • Plain Text
       return XMaterial.matchXMaterial(name).map(XMaterial::parseItem).orElse(null);
    
  • }

  • public static void playSound(Location loc, String name, float volume, float pitch) {

  • Plain Text
       XSound.matchXSound(name).ifPresent(sound -> sound.play(loc, volume, pitch));
    
  • }

  • public static void spawnParticle(Location loc, String name, int count, double spread, double speed) {

  • Plain Text
       World world = loc.getWorld();
    
  • Plain Text
       Particle particle = particle(name);
    
  • Plain Text
       if (world == null || particle == null) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       world.spawnParticle(particle, loc, count, spread, spread, spread, speed);
    
  • }

  • public static void spawnDust(Location loc, Color color, int count, double spread) {

  • Plain Text
       World world = loc.getWorld();
    
  • Plain Text
       Particle particle = particle("DUST");
    
  • Plain Text
       if (world == null || particle == null) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       world.spawnParticle(particle, loc, count, spread, spread, spread, 0, new Particle.DustOptions(color, 1.2f));
    
  • }

  • private static Particle particle(String name) {

  • Plain Text
       return XParticle.of(name).map(XParticle::get).orElse(null);
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/item/CrownItemFactory.java +package com.example.crownbreaker.item;

+import com.cryptomorin.xseries.XAttribute; +import com.example.crownbreaker.CrownBreakerPlugin; +import com.example.crownbreaker.config.ConfigManager; +import com.example.crownbreaker.util.Compat; +import com.example.crownbreaker.util.Text; +import org.bukkit.NamespacedKey; +import org.bukkit.attribute.AttributeModifier; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.persistence.PersistentDataType; +import java.util.List; + +public final class CrownItemFactory { +

  • private static final double PLAYER_BASE_ATTACK_DAMAGE = 1.0;

  • private static final double PLAYER_BASE_ATTACK_SPEED = 4.0;

  • private final CrownBreakerPlugin plugin;

  • private final NamespacedKey identityKey;

  • public CrownItemFactory(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • Plain Text
       this.identityKey = new NamespacedKey(plugin, "crown_breaker");
    
  • }

  • public NamespacedKey getIdentityKey() {

  • Plain Text
       return identityKey;
    
  • }

  • public ItemStack create() {

  • Plain Text
       ItemStack item = Compat.item("MACE");
    
  • Plain Text
       if (item == null) {
    
  • Plain Text
           return null;
    
  • }

  • Plain Text
       ItemMeta meta = item.getItemMeta();
    
  • Plain Text
       if (meta == null) {
    
  • Plain Text
           return null;
    
  • }

  • Plain Text
       ConfigManager cfg = plugin.getConfigManager();
    
  • Plain Text
       meta.setDisplayName(Text.color("&6&lCROWN BREAKER"));
    
  • Plain Text
       meta.setLore(buildLore(cfg));
    
  • Plain Text
       meta.setUnbreakable(true);
    
  • Plain Text
       meta.setEnchantmentGlintOverride(true);
    
  • Plain Text
       meta.getPersistentDataContainer().set(identityKey, PersistentDataType.BYTE, (byte) 1);
    
  • Plain Text
       addAttribute(meta, "attack_damage", "crownbreaker:attack_damage", cfg.getAttackDamage() - PLAYER_BASE_ATTACK_DAMAGE);
    
  • Plain Text
       addAttribute(meta, "attack_speed", "crownbreaker:attack_speed", cfg.getAttackSpeed() - PLAYER_BASE_ATTACK_SPEED);
    
  • Plain Text
       item.setItemMeta(meta);
    
  • Plain Text
       return item;
    
  • }

  • public boolean isCrownBreaker(ItemStack item) {

  • Plain Text
       if (item == null || item.getType().isAir()) {
    
  • Plain Text
           return false;
    
  • }

  • Plain Text
       ItemMeta meta = item.getItemMeta();
    
  • Plain Text
       return meta != null && meta.getPersistentDataContainer().has(identityKey, PersistentDataType.BYTE);
    
  • }

  • private void addAttribute(ItemMeta meta, String attributeName, String modifierName, double amount) {

  • Plain Text
       XAttribute.of(attributeName).ifPresent(attribute ->
    
  • Plain Text
               meta.addAttributeModifier(attribute.get(),
    
  • Plain Text
                       XAttribute.createModifier(modifierName, amount, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND)));
    
  • }

  • private List<String> buildLore(ConfigManager cfg) {

  • Plain Text
       int size = cfg.getUltimateAreaSize();
    
  • Plain Text
       return List.of(
    
  • Plain Text
               "&5&oForged for the crowned breakers of the Nether",
    
  • Plain Text
               "",
    
  • Plain Text
               "&6Attack Damage: &f" + cfg.getAttackDamage(),
    
  • Plain Text
               "&6Attack Speed: &f" + cfg.getAttackSpeed(),
    
  • Plain Text
               "&6Unbreakable",
    
  • Plain Text
               "",
    
  • Plain Text
               "&5&lABILITIES",
    
  • Plain Text
               "&e* Sky Launcher &7(Shift + Right-click)",
    
  • Plain Text
               "&7  Launches you 30 blocks upward. Cooldown " + cfg.getSkyCooldownSeconds() + "s",
    
  • Plain Text
               "&b* Water Dash &7(Right-click in water or rain)",
    
  • Plain Text
               "&7  Dash forward. Cooldown " + cfg.getDashCooldownSeconds() + "s",
    
  • Plain Text
               "&d* Soul Reaper &7(Shift + Left-click at " + cfg.getMaxCharge() + "/" + cfg.getMaxCharge() + " charge)",
    
  • Plain Text
               "&7  Charge with mace smash hits. Deals " + cfg.getUltimateDamage() + " damage in a " + size + "x" + size + " area.",
    
  • Plain Text
               "",
    
  • Plain Text
               "&8Persistent Crown Breaker item"
    
  • Plain Text
       ).stream().map(Text::color).toList();
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/recipe/CrownRecipeManager.java +package com.example.crownbreaker.recipe;

+import com.example.crownbreaker.CrownBreakerPlugin; +import com.example.crownbreaker.util.Compat; +import org.bukkit.Bukkit; +import org.bukkit.Keyed; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.PrepareItemCraftEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.Recipe; +import org.bukkit.inventory.ShapedRecipe; +import java.util.List; +import java.util.Map; + +public final class CrownRecipeManager implements Listener { +

  • private static final String[] SHAPE = {“DDD”, “BSB”, “GNG”};

  • private static final Map<Character, String> INGREDIENTS = Map.of

  • ‘D’, “DIAMOND_BLOCK”,

  • ‘B’, “BLAZE_ROD”,

  • ‘S’, “NETHER_STAR”,

  • ‘G’, “GOLD_BLOCK”,

  • ‘N’, “NETHERITE_BLOCK”

  • );

  • private final CrownBreakerPlugin plugin;

  • private final NamespacedKey recipeKey;

  • public CrownRecipeManager(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • Plain Text
       this.recipeKey = new NamespacedKey(plugin, "crown_breaker_recipe");
    
  • }

  • public NamespacedKey getRecipeKey() {

  • Plain Text
       return recipeKey;
    
  • }

  • public void register() {

  • Plain Text
       Bukkit.removeRecipe(recipeKey);
    
  • Plain Text
       ItemStack result = plugin.getItemFactory().create();
    
  • Plain Text
       if (result == null) {
    
  • Plain Text
           plugin.getLogger().severe("Crown Breaker recipe not registered: the mace item could not be created.");
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       ShapedRecipe recipe = new ShapedRecipe(recipeKey, result);
    
  • Plain Text
       recipe.shape(SHAPE);
    
  • Plain Text
       for (Map.Entry<Character, String> entry : INGREDIENTS.entrySet()) {
    
  • Plain Text
           Material material = Compat.material(entry.getValue());
    
  • Plain Text
           if (material == null) {
    
  • Plain Text
               plugin.getLogger().severe("Crown Breaker recipe not registered: missing material " + entry.getValue());
    
  • Plain Text
               return;
    
  • }

  • Plain Text
           recipe.setIngredient(entry.getKey(), material);
    
  • }

  • Plain Text
       Bukkit.addRecipe(recipe);
    
  • }

  • public List<String> describe() {

  • Plain Text
       return List.of(
    
  • Plain Text
               "&6&lCrown Breaker &7- Crafting Recipe (3x3 crafting table)",
    
  • Plain Text
               "&7Top:    &eDiamond Block &7| &eDiamond Block &7| &eDiamond Block",
    
  • Plain Text
               "&7Middle: &eBlaze Rod &7| &eNether Star &7| &eBlaze Rod",
    
  • Plain Text
               "&7Bottom: &eGold Block &7| &eNetherite Block &7| &eGold Block"
    
  • );

  • }

  • @EventHandler

  • public void onPrepareCraft(PrepareItemCraftEvent event) {

  • Plain Text
       ItemStack result = event.getInventory().getResult();
    
  • Plain Text
       if (!plugin.getItemFactory().isCrownBreaker(result)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Recipe recipe = event.getRecipe();
    
  • Plain Text
       if (recipe instanceof Keyed keyed && recipeKey.equals(keyed.getKey())) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       event.getInventory().setResult(null);
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/command/CrownBreakerCommand.java +package com.example.crownbreaker.command;

+import com.example.crownbreaker.CrownBreakerPlugin; +import com.example.crownbreaker.util.Text; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +public final class CrownBreakerCommand implements CommandExecutor, TabCompleter { +

  • private static final List<String> SUBCOMMANDS = List.of(“give”, “recipe”, “reload”, “help”);

  • private final CrownBreakerPlugin plugin;

  • public CrownBreakerCommand(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • }

  • @Override

  • public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

  • Plain Text
       if (args.length == 0) {
    
  • Plain Text
           giveSelf(sender);
    
  • Plain Text
           return true;
    
  • }

  • Plain Text
       switch (args[0].toLowerCase(Locale.ROOT)) {
    
  • Plain Text
           case "give" -> giveOther(sender, args);
    
  • Plain Text
           case "recipe" -> showRecipe(sender);
    
  • Plain Text
           case "reload" -> reload(sender);
    
  • Plain Text
           case "help" -> showHelp(sender);
    
  • Plain Text
           default -> send(sender, "&cUnknown subcommand. Use /crownbreaker help.");
    
  • }

  • Plain Text
       return true;
    
  • }

  • @Override

  • public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {

  • Plain Text
       if (args.length == 1) {
    
  • Plain Text
           return filter(SUBCOMMANDS, args[0]);
    
  • }

  • Plain Text
       if (args.length == 2 && args[0].equalsIgnoreCase("give")) {
    
  • Plain Text
           List<String> names = new ArrayList<>();
    
  • Plain Text
           Bukkit.getOnlinePlayers().forEach(online -> names.add(online.getName()));
    
  • Plain Text
           return filter(names, args[1]);
    
  • }

  • Plain Text
       return List.of();
    
  • }

  • private void giveSelf(CommandSender sender) {

  • Plain Text
       if (!(sender instanceof Player player)) {
    
  • Plain Text
           send(sender, "&cOnly players can receive the item here. Use /crownbreaker give <player>.");
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (!sender.hasPermission(plugin.getConfigManager().getObtainPermission())) {
    
  • Plain Text
           noPermission(sender);
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       ItemStack item = createItem(sender);
    
  • Plain Text
       if (item == null) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       deliver(player, item);
    
  • Plain Text
       send(player, "&6You received the &lCrown Breaker&6.");
    
  • }

  • private void giveOther(CommandSender sender, String[] args) {

  • Plain Text
       if (!sender.hasPermission(plugin.getConfigManager().getAdminPermission())) {
    
  • Plain Text
           noPermission(sender);
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (args.length < 2) {
    
  • Plain Text
           send(sender, "&cUsage: /crownbreaker give <player>");
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Player target = Bukkit.getPlayerExact(args[1]);
    
  • Plain Text
       if (target == null) {
    
  • Plain Text
           send(sender, "&cPlayer &f" + args[1] + " &cis not online.");
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       ItemStack item = createItem(sender);
    
  • Plain Text
       if (item == null) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       deliver(target, item);
    
  • Plain Text
       send(sender, "&aGave the Crown Breaker to &f" + target.getName() + "&a.");
    
  • Plain Text
       send(target, "&6You received the &lCrown Breaker&6 from an admin.");
    
  • }

  • private void reload(CommandSender sender) {

  • Plain Text
       if (!sender.hasPermission(plugin.getConfigManager().getAdminPermission())) {
    
  • Plain Text
           noPermission(sender);
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       plugin.getConfigManager().reload();
    
  • Plain Text
       send(sender, "&aCrown Breaker configuration reloaded.");
    
  • }

  • private void showRecipe(CommandSender sender) {

  • Plain Text
       plugin.getRecipeManager().describe().forEach(line -> send(sender, line));
    
  • }

  • private void showHelp(CommandSender sender) {

  • Plain Text
       send(sender, "&6&lCrown Breaker Commands");
    
  • Plain Text
       send(sender, "&e/crownbreaker &7- Receive a Crown Breaker");
    
  • Plain Text
       send(sender, "&e/crownbreaker give <player> &7- Give one to another player (admin)");
    
  • Plain Text
       send(sender, "&e/crownbreaker recipe &7- Show the crafting recipe");
    
  • Plain Text
       send(sender, "&e/crownbreaker reload &7- Reload config.yml (admin)");
    
  • Plain Text
       send(sender, "&e/crownbreaker help &7- Show this help");
    
  • Plain Text
       send(sender, "&5&lAbilities");
    
  • Plain Text
       send(sender, "&eSky Launcher &7- Shift + Right-click: launch about 30 blocks upward");
    
  • Plain Text
       send(sender, "&bWater Dash &7- Right-click while in water or rain");
    
  • Plain Text
       send(sender, "&dSoul Reaper &7- Shift + Left-click at full charge (charge with mace smash hits)");
    
  • }

  • private ItemStack createItem(CommandSender sender) {

  • Plain Text
       ItemStack item = plugin.getItemFactory().create();
    
  • Plain Text
       if (item == null) {
    
  • Plain Text
           send(sender, "&cThe Crown Breaker could not be created on this server version.");
    
  • }

  • Plain Text
       return item;
    
  • }

  • private void deliver(Player player, ItemStack item) {

  • Plain Text
       Map<Integer, ItemStack> leftover = player.getInventory().addItem(item);
    
  • Plain Text
       if (leftover.isEmpty()) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       leftover.values().forEach(rest -> player.getWorld().dropItemNaturally(player.getLocation(), rest));
    
  • Plain Text
       send(player, "&eYour inventory was full, so the Crown Breaker was dropped at your feet.");
    
  • }

  • private List<String> filter(List<String> options, String prefix) {

  • Plain Text
       String lower = prefix.toLowerCase(Locale.ROOT);
    
  • Plain Text
       return options.stream().filter(option -> option.toLowerCase(Locale.ROOT).startsWith(lower)).toList();
    
  • }

  • private void noPermission(CommandSender sender) {

  • Plain Text
       send(sender, "&cYou do not have permission to do that.");
    
  • }

  • private void send(CommandSender sender, String message) {

  • Plain Text
       sender.sendMessage(Text.color(message));
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/effects/Effects.java +package com.example.crownbreaker.effects;

+import com.example.crownbreaker.util.Compat; +import org.bukkit.Color; +import org.bukkit.Location; + +public final class Effects { +

  • private static final Color PURPLE = Color.fromRGB(0x8A2BE2);

  • private static final Color RED = Color.fromRGB(0xE01B24);

  • private static final Color BLUE = Color.fromRGB(0x1E90FF);

  • private Effects() {

  • }

  • public static void glow(Location loc) {

  • Plain Text
       Compat.spawnDust(loc, PURPLE, 3, 0.25);
    
  • }

  • public static void skyLaunch(Location loc) {

  • Plain Text
       Compat.spawnDust(loc, PURPLE, 45, 0.6);
    
  • Plain Text
       Compat.spawnParticle(loc, "ENCHANT", 30, 0.5, 0.5);
    
  • Plain Text
       Compat.playSound(loc, "ENTITY_WITHER_SHOOT", 1.0f, 1.3f);
    
  • }

  • public static void waterDash(Location loc) {

  • Plain Text
       Compat.spawnDust(loc, BLUE, 35, 0.5);
    
  • Plain Text
       Compat.spawnParticle(loc, "SPLASH", 30, 0.4, 0.1);
    
  • Plain Text
       Compat.playSound(loc, "ENTITY_PLAYER_SPLASH", 1.0f, 1.0f);
    
  • }

  • public static void soulBurst(Location loc) {

  • Plain Text
       Compat.spawnDust(loc, PURPLE, 70, 1.0);
    
  • Plain Text
       Compat.spawnDust(loc, RED, 50, 1.0);
    
  • Plain Text
       Compat.spawnParticle(loc, "SOUL", 40, 0.8, 0.05);
    
  • Plain Text
       Compat.playSound(loc, "ENTITY_WITHER_SPAWN", 1.0f, 0.8f);
    
  • }

  • public static void soulStrike(Location loc) {

  • Plain Text
       Compat.spawnDust(loc, RED, 20, 0.4);
    
  • Plain Text
       Compat.spawnParticle(loc, "SOUL", 10, 0.3, 0.02);
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/effects/CrownGlowTask.java +package com.example.crownbreaker.effects;

+import com.example.crownbreaker.CrownBreakerPlugin; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; + +public final class CrownGlowTask extends BukkitRunnable { +

  • private final CrownBreakerPlugin plugin;

  • public CrownGlowTask(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • }

  • @Override

  • public void run() {

  • Plain Text
       for (Player player : Bukkit.getOnlinePlayers()) {
    
  • Plain Text
           if (!plugin.getItemFactory().isCrownBreaker(player.getInventory().getItemInMainHand())) {
    
  • Plain Text
               continue;
    
  • }

  • Plain Text
           Effects.glow(player.getLocation().add(0, 1.0, 0));
    
  • }

  • } +} * Add File: src/main/java/com/example/crownbreaker/ability/AbilityListener.java +package com.example.crownbreaker.ability;

+import com.example.crownbreaker.CrownBreakerPlugin; +import com.example.crownbreaker.config.ConfigManager; +import com.example.crownbreaker.effects.Effects; +import com.example.crownbreaker.util.Compat; +import com.example.crownbreaker.util.Text; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.util.Vector; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public final class AbilityListener implements Listener { +

  • private final CrownBreakerPlugin plugin;

  • private final Map<UUID, Long> skyCooldowns = new HashMap<>();

  • private final Map<UUID, Long> dashCooldowns = new HashMap<>();

  • private final Map<UUID, Long> fallProtection = new HashMap<>();

  • public AbilityListener(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • }

  • @EventHandler(ignoreCancelled = true)

  • public void onRightClick(PlayerInteractEvent event) {

  • Plain Text
       if (event.getHand() != EquipmentSlot.HAND) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Action action = event.getAction();
    
  • Plain Text
       if (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Player player = event.getPlayer();
    
  • Plain Text
       if (!plugin.getItemFactory().isCrownBreaker(player.getInventory().getItemInMainHand())) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (player.isSneaking()) {
    
  • Plain Text
           launchSky(player);
    
  • } else {

  • Plain Text
           waterDash(player);
    
  • }

  • }

  • @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)

  • public void onFallDamage(EntityDamageEvent event) {

  • Plain Text
       if (event.getCause() != DamageCause.FALL) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (!(event.getEntity() instanceof Player player)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Long until = fallProtection.remove(player.getUniqueId());
    
  • Plain Text
       if (until == null || System.currentTimeMillis() > until) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       event.setCancelled(true);
    
  • }

  • @EventHandler

  • public void onQuit(PlayerQuitEvent event) {

  • Plain Text
       fallProtection.remove(event.getPlayer().getUniqueId());
    
  • }

  • private void launchSky(Player player) {

  • Plain Text
       ConfigManager cfg = plugin.getConfigManager();
    
  • Plain Text
       UUID id = player.getUniqueId();
    
  • Plain Text
       long left = cooldownRemaining(skyCooldowns, id, cfg.getSkyCooldownSeconds() * 1000L);
    
  • Plain Text
       if (left > 0) {
    
  • Plain Text
           player.sendMessage(Text.color("&dSky Launcher ready in " + secondsLeft(left) + "s."));
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       long now = System.currentTimeMillis();
    
  • Plain Text
       skyCooldowns.put(id, now);
    
  • Plain Text
       fallProtection.put(id, now + cfg.getSkyFallProtectionSeconds() * 1000L);
    
  • Plain Text
       player.setVelocity(new Vector(0, cfg.getSkyLaunchVelocity(), 0));
    
  • Plain Text
       Effects.skyLaunch(player.getLocation());
    
  • }

  • private void waterDash(Player player) {

  • Plain Text
       if (!isInWaterOrRain(player)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       ConfigManager cfg = plugin.getConfigManager();
    
  • Plain Text
       UUID id = player.getUniqueId();
    
  • Plain Text
       long left = cooldownRemaining(dashCooldowns, id, cfg.getDashCooldownSeconds() * 1000L);
    
  • Plain Text
       if (left > 0) {
    
  • Plain Text
           player.sendMessage(Text.color("&bWater Dash ready in " + secondsLeft(left) + "s."));
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Vector facing = player.getLocation().getDirection().setY(0);
    
  • Plain Text
       if (facing.lengthSquared() < 1.0E-4) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Vector dash = facing.normalize().multiply(cfg.getDashStrength()).setY(cfg.getDashUpwardBoost());
    
  • Plain Text
       dashCooldowns.put(id, System.currentTimeMillis());
    
  • Plain Text
       player.setVelocity(dash);
    
  • Plain Text
       Effects.waterDash(player.getLocation());
    
  • }

  • private boolean isInWaterOrRain(Player player) {

  • Plain Text
       Location loc = player.getLocation();
    
  • Plain Text
       Material water = Compat.material("WATER");
    
  • Plain Text
       Block feet = loc.getBlock();
    
  • Plain Text
       if (water != null && (feet.getType() == water || feet.getRelative(BlockFace.UP).getType() == water)) {
    
  • Plain Text
           return true;
    
  • }

  • Plain Text
       World world = loc.getWorld();
    
  • Plain Text
       return world != null && world.hasStorm() && world.getHighestBlockYAt(loc) <= loc.getBlockY();
    
  • }

  • private long cooldownRemaining(Map<UUID, Long> cooldowns, UUID id, long cooldownMillis) {

  • Plain Text
       long last = cooldowns.getOrDefault(id, 0L);
    
  • Plain Text
       return Math.max(0L, last + cooldownMillis - System.currentTimeMillis());
    
  • }

  • private long secondsLeft(long millis) {

  • Plain Text
       return (millis + 999L) / 1000L;
    
  • } +} * Add File: src/main/java/com/example/crownbreaker/ability/SoulReaperListener.java +package com.example.crownbreaker.ability;

+import com.example.crownbreaker.CrownBreakerPlugin; +import com.example.crownbreaker.config.ConfigManager; +import com.example.crownbreaker.effects.Effects; +import com.example.crownbreaker.util.Text; +import org.bukkit.GameMode; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.EquipmentSlot; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public final class SoulReaperListener implements Listener { +

  • private static final double MIN_SMASH_FALL_DISTANCE = 1.5;

  • private final CrownBreakerPlugin plugin;

  • private final Map<UUID, Integer> charges = new HashMap<>();

  • public SoulReaperListener(CrownBreakerPlugin plugin) {

  • Plain Text
       this.plugin = plugin;
    
  • }

  • @EventHandler(ignoreCancelled = true)

  • public void onHit(EntityDamageByEntityEvent event) {

  • Plain Text
       if (!(event.getDamager() instanceof Player player)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (!(event.getEntity() instanceof LivingEntity)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (!isCrownHeld(player)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (player.isSneaking() && getCharge(player) >= maxCharge()) {
    
  • Plain Text
           event.setCancelled(true);
    
  • Plain Text
           unleash(player);
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (event.getCause() == DamageCause.ENTITY_ATTACK && player.getFallDistance() > MIN_SMASH_FALL_DISTANCE) {
    
  • Plain Text
           addCharge(player);
    
  • }

  • }

  • @EventHandler

  • public void onLeftClick(PlayerInteractEvent event) {

  • Plain Text
       if (event.getHand() != EquipmentSlot.HAND) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Action action = event.getAction();
    
  • Plain Text
       if (action != Action.LEFT_CLICK_AIR && action != Action.LEFT_CLICK_BLOCK) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       Player player = event.getPlayer();
    
  • Plain Text
       if (!player.isSneaking() || !isCrownHeld(player)) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       if (getCharge(player) < maxCharge()) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       unleash(player);
    
  • }

  • @EventHandler

  • public void onQuit(PlayerQuitEvent event) {

  • Plain Text
       charges.remove(event.getPlayer().getUniqueId());
    
  • }

  • private void addCharge(Player player) {

  • Plain Text
       int max = maxCharge();
    
  • Plain Text
       int current = getCharge(player);
    
  • Plain Text
       if (current >= max) {
    
  • Plain Text
           return;
    
  • }

  • Plain Text
       charges.put(player.getUniqueId(), current + 1);
    
  • Plain Text
       if (current + 1 == max) {
    
  • Plain Text
           player.sendMessage(Text.color("&d&lSoul Reaper fully charged! &7Shift + Left-click to unleash."));
    
  • }

  • }

  • private void unleash(Player player) {

  • Plain Text
       ConfigManager cfg = plugin.getConfigManager();
    
  • Plain Text
       charges.put(player.getUniqueId(), 0);
    
  • Plain Text
       double half = cfg.getUltimateAreaSize() / 2.0;
    
  • Plain Text
       double vertical = cfg.getUltimateVerticalRange();
    
  • Plain Text
       int hits = 0;
    
  • Plain Text
       for (Entity entity : player.getNearbyEntities(half, vertical, half)) {
    
  • Plain Text
           if (!(entity instanceof LivingEntity target)) {
    
  • Plain Text
               continue;
    
  • }

  • Plain Text
           if (!isValidTarget(player, target)) {
    
  • Plain Text
               continue;
    
  • }

  • Plain Text
           target.damage(cfg.getUltimateDamage(), player);
    
  • Plain Text
           Effects.soulStrike(target.getLocation().add(0, 1, 0));
    
  • Plain Text
           hits++;
    
  • }

  • Plain Text
       Effects.soulBurst(player.getLocation().add(0, 1, 0));
    
  • Plain Text
       player.sendMessage(Text.color("&5Soul Reaper unleashed! &7Struck &f" + hits + " &7target(s)."));
    
  • }

  • private boolean isValidTarget(Player caster, LivingEntity target) {

  • Plain Text
       if (target.getUniqueId().equals(caster.getUniqueId())) {
    
  • Plain Text
           return false;
    
  • }

  • Plain Text
       if (!target.isValid() || target.isInvulnerable()) {
    
  • Plain Text
           return false;
    
  • }

  • Plain Text
       if (target instanceof ArmorStand) {
    
  • Plain Text
           return false;
    
  • }

  • Plain Text
       return !(target instanceof Player other && other.getGameMode() == GameMode.SPECTATOR);
    
  • }

  • private boolean isCrownHeld(Player player) {

  • Plain Text
       return plugin.getItemFactory().isCrownBreaker(player.getInventory().getItemInMainHand());
    
  • }

  • private int getCharge(Player player) {

  • Plain Text
       return charges.getOrDefault(player.getUniqueId(), 0);
    
  • }

  • private int maxCharge() {

  • Plain Text
       return plugin.getConfigManager().getMaxCharge();
    
  • } +} * End Patch

I wrote the full project in Kodari, but I have not compiled it yet. This session has no build tool I can run, so treat the first Compile as the real test.

What I built

  • Paper target: io.papermc.paper:paper-api:26.2.build.133-stable on Java 25, which is the version set in build.gradle.

  • Recipe: The layout and pattern conflicted in the middle-middle slot. Your grid says Nether Star there, but the pattern wrote “N” (Netherite) there too. I followed the grid as you asked: DDD / BSB / GNG with D = Diamond Block, B = Blaze Rod, S = Nether Star, G = Gold Block, N = Netherite Block. Recipes are registered on enable, and any old copy is removed first.

  • Output guard: Any crafting result carrying the Crown Breaker ID from a recipe other than this one is blocked.

  • Item: A mace with a persistent ID, unbreakable, glint, gold name, purple lore, and attack damage 6 / attack speed 0.6 (set through modifiers that match the mace’s base values). A purple particle glow shows on holders.

  • Abilities:

    • Sky Launcher: Shift + right-click, 10s cooldown. Fall damage from the launch is cancelled for 15s, so the 30-block launch doesn’t kill the player.

    • Water Dash: right-click in water or rain, 5s cooldown.

    • Soul Reaper: charge with smash hits (max 25). Shift + left-click at full charge deals 100 damage in a 7×7 area and resets the charge to 0 right away, so one click can’t fire it twice.

  • Commands: /crownbreaker, give <player>, recipe, reload, help. Permission nodes are set in config.yml. Full inventories drop the item at your feet.

What I could not do

  • ./gradlew build: I can’t create the Gradle wrapper binary. Kodari’s Compile produces the same build, so you don’t need the wrapper.

  • Source ZIP: I can’t generate a ZIP. The project is all in Kodari.

Getting the jar

  1. On desktop click Compile in the top bar. On phone tap ⋮ → Compile Project.

  2. In the window, click Compile.

  3. When it succeeds, click Download CrownBreaker.jar.

  4. Put the jar in your server’s plugins folder and restart.

If the build fails, click Auto-fix in the chat.

Things to check once it runs

  • The sky launch height (launch-velocity: 2.68) is my estimate for about 30 blocks. Tune it in config if your server shows a different height.

  • api-version: '26.2' in plugin.yml is my best guess at the year-based format. If the server rejects the plugin on load, that line is the first thing to check.

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

No files in this session

Code