sykicgotqd

⚔️ Ultimate SMP Legendary Weapons Plugin — Development Prompt

Act as a senior Minecraft Java plugin developer. Build a complete, polished, production-ready Minecraft Java Edition plugin called LegendaryWeapons for a private Survival SMP.

The plugin must include 7 unique legendary weapons, each with two exclusive abilities, custom crafting recipes, a 15-minute summoning ritual, cooldowns, configurable settings, and powerful admin commands.

  1. Legendary Weapons

Create these 7 weapons:

  1. Voltaris Blade — Lightning and electric power.
  2. Riftcleaver Sword — Dimension manipulation and teleportation.
  3. Nightfall Scythe — Shadow energy and life-steal effects.
  4. Voidrender Blade — Void energy and spatial attacks.
  5. Frostbite Blade — Ice, freezing, and slowing effects.
  6. Skyfall Wand — Wind, levitation, and aerial attacks.
  7. Crimson Reaper — Crimson energy and powerful area attacks.

Each weapon must have:

  • A unique display name and custom item identifier.
  • A custom Minecraft item appearance using supported item components or resource-pack models.
  • Unique lore describing the weapon and its abilities.
  • A unique particle effect and sound effect for each ability.
  • Configurable damage, range, cooldowns, and duration.
  • Persistent item identification so renamed or forged items cannot accidentally trigger abilities.
  • Protection against item duplication and unintended ability activation.
  1. Weapon Ability System

Every weapon must have exactly two unique abilities.

Ability 1: Activate by holding the weapon, sneaking, and right-clicking (Shift + Right Click).

Ability 2: Activate by holding the weapon, sneaking, and pressing F (Shift + F).

In Minecraft Java Edition, F is the default offhand-swap key. Implement a reliable solution that detects the swap-hand interaction and activates Ability 2 without accidentally swapping the weapon. Cancel the swap only when the correct weapon is held and the player is sneaking. Explain any limitations or conflicts with other plugins.

Voltaris Blade

  • Ability 1 — Thunder Strike: Call lightning at the targeted location and damage nearby enemies.
  • Ability 2 — Overcharge: Surround the player with electric particles and temporarily increase movement speed and attack power.

Riftcleaver Sword

  • Ability 1 — Rift Dash: Dash toward the targeted direction with safe collision handling.
  • Ability 2 — Dimensional Rift: Open a temporary rift that teleports nearby enemies a short distance, subject to safe-location checks.

Nightfall Scythe

  • Ability 1 — Shadow Cleave: Release a dark wave that damages enemies in front of the player.
  • Ability 2 — Soul Harvest: Damage nearby enemies and restore a configurable amount of the user's health, with strict healing limits.

Voidrender Blade

  • Ability 1 — Void Slash: Launch a void projectile that damages enemies on impact.
  • Ability 2 — Black Hole: Create a temporary visual vortex that pulls nearby enemies inward without dragging them through solid blocks or into unsafe locations.

Frostbite Blade

  • Ability 1 — Frost Nova: Release an icy blast that damages and slows nearby enemies.
  • Ability 2 — Frozen Ground: Temporarily create an icy effect on the ground that slows enemies who enter the area.

Skyfall Wand

  • Ability 1 — Skyfall Meteor: Summon a magical projectile from above that impacts a targeted area with configurable damage and particles.
  • Ability 2 — Wind Ascension: Launch the user upward with controlled velocity and temporary fall-damage protection.

Crimson Reaper

  • Ability 1 — Crimson Wave: Send a crimson energy wave toward enemies.
  • Ability 2 — Blood Pact: Temporarily empower the player with configurable strength and regeneration effects at a balanced health or resource cost.

All abilities must include proper cooldowns, target validation, safe-location checks, and protection against excessive damage. Effects must be visually impressive without causing server lag.

  1. Crafting Recipes

Create one unique, configurable shaped crafting recipe for each weapon.

Use vanilla Minecraft materials and a unique legendary core item as ingredients. Give each weapon a distinct recipe and avoid recipes that conflict with vanilla recipes.

Default recipe designs:

  • Voltaris Blade: Lightning Rod + Diamond + Gold Ingot + Netherite Sword.
  • Riftcleaver Sword: Ender Pearl + Obsidian + End Crystal ingredient substitute + Netherite Sword.
  • Nightfall Scythe: Wither Skeleton Skull + Soul Sand + Netherite Ingot + Netherite Sword.
  • Voidrender Blade: Ender Eye + Obsidian + Echo Shard + Netherite Sword.
  • Frostbite Blade: Packed Ice + Blue Ice + Diamond + Netherite Sword.
  • Skyfall Wand: Breeze Rod + Feather + Amethyst Shard + Blaze Rod.
  • Crimson Reaper: Nether Wart + Redstone + Magma Cream + Netherite Sword.

Use valid, supported vanilla materials for every recipe. If a suggested ingredient is unsafe or cannot be used in a normal crafting grid, substitute a suitable material. Recipes must be fully configurable in a recipes configuration file.

The resulting weapon must have its own persistent identifier, custom name, lore, and abilities. Ordinary renamed vanilla items must never be recognized as legendary weapons.

  1. Fifteen-Minute Crafting Ritual

When a player successfully crafts any legendary weapon using its recipe, do not immediately give them the completed weapon.

Instead, begin a 15-minute ritual:

  1. Detect the successful crafting event.
  2. Consume the ingredients and prevent duplicate weapon output.
  3. Announce the ritual to the player and optionally the server.
  4. Start a configurable 15-minute countdown.
  5. Display the remaining ritual time through action-bar messages and particle effects.
  6. Create a configurable ritual location or altar with visual effects.
  7. Display the weapon name being summoned.
  8. When the timer reaches zero, complete the ritual and award the weapon exactly once.
  9. If the server restarts, save and restore active rituals with their remaining time.
  10. Prevent players from claiming the same weapon multiple times through inventory glitches, reconnects, or repeated interactions.

If the ritual requires a physical altar, implement configurable altar materials and validation. If the player disconnects or the server restarts, the ritual must continue according to configuration.

Provide clear messages for ritual start, progress, completion, cancellation, and errors.

  1. Commands

Create a clean command system with tab completion and permission checks.

Player commands:

  • "/weapons" — Show all legendary weapons and their descriptions.
  • "/weapons info <weapon>" — View weapon stats, abilities, and cooldown information.
  • "/weapons recipe <weapon>" — View the crafting recipe.
  • "/weapons cooldowns" — Show active ability cooldowns.
  • "/weapons ritual" — View the player's active ritual and remaining time.

Admin commands:

  • "/weapons give <player> <weapon>" — Give a specific legendary weapon.
  • "/weapons giveall <player>" — Give all seven weapons to a player.
  • "/weapons reload" — Reload supported configuration files safely.
  • "/weapons ritual start <player> <weapon>" — Start a ritual for a player.
  • "/weapons ritual cancel <player>" — Cancel a player's active ritual.
  • "/weapons ritual complete <player>" — Complete a ritual with duplicate prevention.
  • "/weapons cooldown reset <player>" — Reset the player's weapon cooldowns.
  • "/weapons recipe enable <weapon>" — Enable a recipe.
  • "/weapons recipe disable <weapon>" — Disable a recipe.
  • "/weapons list" — List all registered weapons.
  • "/weapons help" — Display command usage.

Use separate permissions for player and administrator commands. Never allow ordinary players to access administrative commands.

  1. Action Bar and User Interface

Display useful information above the hotbar using the action bar.

Examples:

  • "⚡ Voltaris Blade | Thunder Strike: READY"
  • "❄ Frostbite Blade | Frost Nova: 12s"
  • "✦ Ritual: Voidrender Blade | 08:42 remaining"

Show cooldowns for both abilities. Ensure action-bar updates are efficient and do not conflict unnecessarily with other plugins.

Add an optional GUI menu to browse weapons, read ability descriptions, and inspect recipes.

  1. Configuration

Provide editable configuration files:

  • "config.yml" — General settings, messages, permissions, damage, cooldowns, and effects.
  • "weapons.yml" — Weapon stats, abilities, ranges, and durations.
  • "recipes.yml" — Crafting ingredients and recipe enable/disable options.
  • "rituals.yml" — Ritual duration, altar requirements, particles, announcements, and persistence.

Allow server owners to change damage, cooldowns, effect duration, crafting ingredients, and ritual duration without modifying Java code.

  1. Technical Requirements
  • Platform: Minecraft Java Edition.
  • Target version: Minecraft 1.21.x.
  • Server compatibility: Paper, using APIs compatible with the selected target version.
  • Language: Java.
  • Build system: Maven.
  • Include a complete "plugin.yml", Java source files, configuration files, and "pom.xml".
  • Use maintainable object-oriented architecture with separate classes for weapons, abilities, recipes, rituals, commands, listeners, and cooldown management.
  • Use persistent data containers to identify custom weapons.
  • Store active rituals and relevant player data safely.
  • Clean up scheduled tasks and temporary effects when no longer needed.
  • Avoid deprecated APIs where practical.
  • Include permission checks, input validation, error handling, and server-safe task scheduling.
  • Do not use NMS or reflection unless absolutely necessary and clearly documented.
  • Never claim a build or feature works unless it has been compiled and tested.
  1. Final Deliverables

Provide the complete project structure and every required source file.

Explain:

  1. How to build the plugin JAR using Maven.
  2. How to install it on a Paper 1.21.x server.
  3. How to configure weapons and recipes.
  4. How to test both abilities of every weapon.
  5. How to test crafting rituals, server restarts, cooldowns, and permissions.
  6. How to create or install an optional resource pack for custom weapon textures.

The final result should feel like a polished, professional legendary-weapons system for a private PvP and survival SMP, with balanced abilities, reliable crafting rituals, excellent visual effects, and no duplication exploits.

Kodari AI
KodariOct 17 at 8:36 am 3
LegendaryWeapons
LegendaryWeapons is a comprehensive Paper plugin for Minecraft 1.21.x that introduces seven unique legendary weapons, each with two exclusive abilities, custom crafting recipes, and a 15-minute summoning ritual. Features include a robust ability system with cooldowns, particle effects, and safe-location checks, a persistent ritual system that survives server restarts, and a full command suite with tab completion and permission checks. Configuration files allow server owners to adjust damage, cooldowns, recipes, and ritual settings without code changes. The plugin uses a GUI menu for browsing weapons and abilities, action-bar cooldown displays, and protects against duplication exploits through persistent item identification.
  1. Create the Maven/Paper plugin scaffold and configurable weapon/recipe/ritual definitions.

  2. Implement weapon identity, abilities, cooldowns, ritual persistence, crafting protection, commands, and the optional menu.

  3. Add setup and usage guidance, including the Kodari build workflow.

Created the LegendaryWeapons Maven/Paper project with seven PDC-identified weapons, 14 abilities, configurable recipes and cooldowns, persistent 15-minute rituals, admin/player commands, action-bar updates, and a weapon browser GUI. Crafting requires a weapon-specific core; /weapons core <player> <weapon> gives one.

Build and install

  1. The project includes a pom.xml targeting Java 21 and Paper 1.21.4. In Kodari, click Compile in the top bar; on phone, tap ⋮ → Compile Project, then Compile and Download.

  2. Put the downloaded JAR in your Paper server’s plugins folder and restart the server.

Configure and test

  • Edit config.yml, weapons.yml, recipes.yml, and rituals.yml; /weapons reload reloads them. Recipe cores go in the top-middle slot by default; use K in a recipe shape to place one elsewhere.

  • Give a weapon with /weapons give <player> <weapon>. Sneak + right-click activates ability 1; sneak + F activates ability 2. /weapons info, /weapons cooldowns, and /weapons ritual show details and status.

  • For a recipe test, give the matching core with /weapons core <player> <weapon>, craft the weapon, and check the ritual. Temporarily lower duration-seconds in rituals.yml to test completion and restart recovery.

  • Admin commands require legendaryweapons.admin (default: op); ability use and player commands have separate permission nodes.

Notes

  • F is handled through the offhand-swap event. The swap is cancelled only while sneaking with a recognized weapon in the main hand; another plugin that intercepts that event may conflict.

  • PDC identity prevents ordinary renamed items from activating abilities, and ritual claims have duplicate-delivery guards. Creative/admin copies and duplication caused by other plugins cannot be universally prevented by this plugin.

  • Weapon model-data IDs 10001–10007 are configured, but resource-pack assets are not included. Texture generation is currently disabled: enable it from the project Settings → Generation, or at kodari.ai/settings?tab=features. Map those IDs to the weapon assets in your resource pack.

  • I haven’t compiled or run this project on a Paper server here, so the implementation is not presented as build-verified.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
14 1,826
src/main/java/com/kodari/legendaryweapons/LegendaryWeaponsPlugin.java
package com.kodari.legendaryweapons;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public final class LegendaryWeaponsPlugin extends JavaPlugin {
    private WeaponManager weaponManager;
    private CooldownManager cooldownManager;
    private RitualManager ritualManager;
    private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        for (String file : new String[]{"weapons.yml", "recipes.yml", "rituals.yml"}) {
            if (!new java.io.File(getDataFolder(), file).exists()) saveResource(file, false);
        }
        weaponManager = new WeaponManager(this);
        cooldownManager = new CooldownManager();
        ritualManager = new RitualManager(this, weaponManager);
        abilityManager = new AbilityManager(this, weaponManager, cooldownManager);
        ritualManager.start();
        Bukkit.getPluginManager().registerEvents(new WeaponListener(this, weaponManager, abilityManager, ritualManager), this);
        WeaponsCommand executor = new WeaponsCommand(this);
        PluginCommand command = getCommand("weapons");
        if (command == null) throw new IllegalStateException("/weapons command is missing from plugin.yml");
        command.setExecutor(executor);
        command.setTabCompleter(executor);
        Bukkit.getScheduler().runTaskTimer(this, this::updateActionBars, 20L, 20L);
        getLogger().info("LegendaryWeapons enabled with seven weapon definitions.");
    }

    @Override
    public void onDisable() {
        if (ritualManager != null) ritualManager.stop();
    }

    public WeaponManager getWeaponManager() {
        return weaponManager;
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public RitualManager getRitualManager() {
        return ritualManager;
    }

    public AbilityManager getAbilities() {
        return abilityManager;
    }

    public String permission(String type) {
        return getConfig().getString("permissions." + type, "legendaryweapons." + type);
    }

    public String message(String key, String placeholder, String value) {
        return messageText(key).replace("{" + placeholder + "}", value);
    }

    public void message(Player player, String key) {
        player.sendMessage(messageText(key));
    }

    public String messageText(String key) {
        return ChatColor.translateAlternateColorCodes('&', getConfig().getString("messages.prefix", "")
                + getConfig().getString("messages." + key, ""));
    }

    public void giveWeapon(Player player, WeaponType type) {
        ItemStack item = weaponManager.createWeapon(type);
        if (item == null) {
            player.sendMessage(ChatColor.RED + "Could not create weapon: invalid material configuration.");
            return;
        }
        var overflow = player.getInventory().addItem(item);
        overflow.values().forEach(stack -> player.getWorld().dropItemNaturally(player.getLocation(), stack));
    }

    public void giveCore(Player player, WeaponType type) {
        ItemStack core = weaponManager.createCore(type);
        if (core == null) {
            player.sendMessage(ChatColor.RED + "Could not create the configured core item.");
            return;
        }
        var overflow = player.getInventory().addItem(core);
        overflow.values().forEach(stack -> player.getWorld().dropItemNaturally(player.getLocation(), stack));
    }

    public boolean giveRitualWeapon(Player player, WeaponType type, String serial) {
        if (player.getInventory().firstEmpty() == -1) return false;
        ItemStack item = weaponManager.createWeapon(type, serial);
        if (item == null) return false;
        player.getInventory().addItem(item);
        return weaponManager.hasSerial(player, serial);
    }

    public void reloadPluginSettings() {
        reloadConfig();
        weaponManager.reload();
        ritualManager.reload();
    }

    public void showWeaponInfo(Player player, WeaponType type) {
        var section = weaponManager.weaponConfig().getConfigurationSection("weapons." + type.id());
        player.sendMessage(ChatColor.DARK_PURPLE + "--- " + weaponManager.displayName(type) + ChatColor.DARK_PURPLE + " ---");
        player.sendMessage(ChatColor.GRAY + weaponManager.weaponConfig().getString("weapons." + type.id() + ".description", ""));
        for (int ability = 1; ability <= 2; ability++) {
            String path = "weapons." + type.id() + ".abilities." + ability;
            String name = weaponManager.weaponConfig().getString(path + ".name", "Ability " + ability);
            long cooldown = cooldownManager.remainingMillis(player.getUniqueId(), type, ability);
            String cooldownText = cooldown == 0 ? "READY" : Math.max(1, (cooldown + 999) / 1000) + "s";
            player.sendMessage(ChatColor.YELLOW + "Ability " + ability + ": " + name + ChatColor.GRAY + " | CD: " + cooldownText);
        }
        if (section == null) player.sendMessage(ChatColor.RED + "This weapon has no configuration section.");
    }

    private void updateActionBars() {
        if (!getConfig().getBoolean("settings.actionbar", true)) return;
        for (Player player : Bukkit.getOnlinePlayers()) {
            String ritualBar = ritualManager.actionbar(player.getUniqueId());
            if (ritualBar != null) {
                player.sendActionBar(ritualBar);
                continue;
            }
            weaponManager.identify(player.getInventory().getItemInMainHand()).ifPresent(type -> {
                String base = weaponManager.displayName(type);
                String first = weaponManager.weaponConfig().getString("weapons." + type.id() + ".abilities.1.name", "Ability 1");
                String second = weaponManager.weaponConfig().getString("weapons." + type.id() + ".abilities.2.name", "Ability 2");
                String bar = base + ChatColor.GRAY + " | " + first + ": " + cooldownManager.cooldownLabel(player.getUniqueId(), type, 1)
                        + ChatColor.DARK_GRAY + "  |  " + second + ": " + cooldownManager.cooldownLabel(player.getUniqueId(), type, 2);
                player.sendActionBar(bar);
            });
        }
    }
}