Zuraiz429
πŸ“Ž 1 file 5,149 chars
πŸ“„
pasted-code-1793367473462.txt
txt 61 lines
β–Ά
PROJECT: LEGENDARY ARSENAL
Custom Minecraft PvP Weapons Plugin
I want you to develop a complete, professional Minecraft Paper plugin named Legendary Arsenal
The plugin is designed for a small multiplayer SMP with approximately  10 players. Its main purpose is to introduce 10 unique, balanced custom weapons with special abilities, configurable cooldowns and custom crafting recipes.
Target Server: Paper 26.2.Plugin Language: Jav.Before development, verify the correct Paper API, Java version and resource pack format for the target Minecraft version. Do not assume incompatible or outdated APIs.
1. CUSTOM WEAPONS
Create these 10 unique weapons:
1. Blood Reaper β€” Sword
* Passive: Steals a small amount of health when hitting enemies. Special Ability: Blood Slash. Sends a short-range blood slash towards enemies.
2. Thunder Katana β€” Sword
* Passive: Small chance of dealing bonus lightning damage. Special Ability: Thunder Dash. Quickly dashes towards the direction the player is facing.
3. Frostbite β€” Sword
* Passive: Applies a short slowness effect. Special Ability: Ice Prison. Temporarily freezes an enemy for a configurable duration.
4. Shadow Scythe β€” Scythe
* Passive: Slightly increases damage against nearby enemies. Special Ability: Shadow Swap. Exchanges positions with a targeted enemy.
5. Earthquake Hammer β€” Hammer
* Passive: Provides additional knockback. Special Ability: Ground Slam. Creates a ground shockwave that damages and knocks back nearby enemies.
6. Venom Fang β€” Dagger
* Passive: Has a chance to apply poison. Special Ability: Poison Explosion. Creates a small poison explosion around the player.
7. Demon Twins β€” Dual Blades
* Passive: Consecutive hits increase attack speed slightly. Special Ability: Twin Strike. Performs two quick consecutive attacks.
8. Storm Trident β€” Trident
* Passive: Provides additional knockback. Special Ability: Storm Wave. Sends a forward-moving wave that damages nearby enemies.
9. Inferno Bow β€” Bow
* Passive: Arrows have a configurable chance to ignite enemies. Special Ability: Charged Shot. Fires a powerful charged arrow dealing bonus damage.
10. Void Breaker β€” Greatsword
* Passive: Slight bonus damage against nearby enemies. Special Ability: Void Burst. Creates a small area explosion that damages and knocks back nearby enemies.
All weapon abilities must be functional, not just visual effects.
2. BALANCED PvP SYSTEM
* No weapon should be excessively overpowered.- No ability should instantly kill a player with full health and normal armor.- Every weapon should have its own strengths and weaknesses.- Every ability must have a reasonable range and damage limit.- Prevent infinite ability usage and exploit abuse.- Ensure all weapons remain useful against each other.- Keep the gameplay suitable for small SMP PvP battles.
Use Minecraft's normal combat mechanics as a balancing reference.
3. CONFIGURABLE COOLDOWN SYSTEM
Every weapon must have its own configurable ability cooldown.Example default values:
* Blood Reaper: 20 seconds- Thunder Katana: 15 seconds- Frostbite: 25 seconds- Shadow Scythe: 20 seconds- Earthquake Hammer: 25 seconds- Venom Fang: 20 seconds- Demon Twins: 15 seconds- Storm Trident: 20 seconds- Inferno Bow: 25 seconds- Void Breaker: 30 seconds.These are default values only.
Admins must be able to customize cooldowns through configuration files without modifying Java code.
4. CONFIGURABLE WEAPON SETTINGS
Provide configuration options for every weapon, including:
* Base damage- Ability damage- Attack range- Ability range- Cooldown- Ability duration- Knockback strength- Potion effects- Potion effect duration- Special ability settings- Passive ability settings- Enable/disable individual weapons
All important gameplay settings must be customizable.
5. ACTIONBAR COOLDOWN DISPLAY
Show ability cooldown information in the player's ActionBar.
Examples:
When ability is available:[Thunder Dash] READYWhen ability is on cooldown:[Thunder Dash] 8s
Update the display smoothly without creating unnecessary server lag.
6. CUSTOM CRAFTING RECIPES
Every weapon must have its own unique crafting recipe.
Requirements:
* Custom crafting recipes for all 10 weapons.- Configurable crafting ingredients.- Configurable recipe patterns.- Admin option to enable or disable individual recipes.- Give each weapon its correct custom identity when crafted.
All recipes must work correctly in normal Minecraft crafting tables.
8. ADMIN COMMANDS AND PERMISSIONS
Implement these commands:
/arsenal give  
/arsenal list
/arsenal info 
/arsenal reload
Requirements:
* Admin-only permissions for giving weapons and reloading.- Appropriate player permissions where necessary.- Clear error messages for invalid commands.- Tab completion for weapon names and player names.- Configurable plugin messages.
9. CONFIGURATION FILES
Organize the plugin configuration properly.Create:
* config.yml β€” Main plugin settings.- weapons.yml β€” Weapon damage, abilities and cooldowns.- recipes.yml β€” Custom crafting recipes.- messages.yml β€” Plugin messages.- resourcepack.yml β€” Resource pack settings.
All settings should have clear comments and understandable names.
Kodari AI
KodariOct 30 at 1:57 pm 3
LegendaryArsenal
A comprehensive Paper plugin introducing 10 unique, balanced custom PvP weapons with functional special abilities, configurable cooldowns, and custom crafting recipes. Features include passive effects like health steal, lightning damage, and poison application; active abilities such as dash attacks, ground slams, and area explosions. Includes a full actionbar cooldown display system, admin commands with tab completion, and five configuration files (config, weapons, recipes, messages, resourcepack) allowing complete customization of damage, ranges, durations, and recipe patterns. Designed for small SMP servers with balanced combat mechanics preventing overpowered gameplay.
  1. Verify the requested Paper/Minecraft target and its Java/resource-pack requirements.

  2. Create the plugin build and metadata for that verified target.

  3. Implement configurable weapons, combat abilities, cooldowns, recipes, messages, and admin commands.

Created Legendary Arsenal for Paper 26.2 with all ten weapons, configurable passives and abilities, custom recipes, cooldown ActionBars, and /arsenal give, list, info, and reload.

The project targets Java 25 and pins the Paper API to 26.2.build.135-stable; Paper’s requirements specify Java 25 for 26.1 and later. Weapon settings, recipes, messages, and resource-pack delivery settings are in separate YAML files. Damage and ability settings have code-level caps to help prevent one-shot attacks.

No resource-pack assets are bundled. resourcepack.yml sends an externally hosted pack, so that pack’s own pack.mcmeta must declare compatibility with Minecraft 26.2; the plugin doesn’t invent or generate a pack format.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 1,365
src/main/java/com/kodari/legendaryarsenal/LegendaryArsenal.java
package com.kodari.legendaryarsenal;

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.util.Objects;

public final class LegendaryArsenal extends JavaPlugin {
    private FileConfiguration messages;
    private FileConfiguration resourcePackConfig;
    private WeaponManager weaponManager;
    private CooldownManager cooldownManager;
    private RecipeManager recipeManager;
    private AbilityService abilityService;

    @Override
    public void onEnable() {
        getDataFolder().mkdirs();
        saveDefaultConfig();
        saveIfMissing("weapons.yml");
        saveIfMissing("recipes.yml");
        saveIfMissing("messages.yml");
        saveIfMissing("resourcepack.yml");

        weaponManager = new WeaponManager(this);
        cooldownManager = new CooldownManager();
        recipeManager = new RecipeManager(this, weaponManager);
        reloadSettings();
        abilityService = new AbilityService(this, weaponManager, cooldownManager);

        Bukkit.getPluginManager().registerEvents(new WeaponListener(this, weaponManager, abilityService, cooldownManager), this);
        Bukkit.getPluginManager().registerEvents(new ResourcePackListener(this), this);

        ArsenalCommand command = new ArsenalCommand(this, weaponManager);
        Objects.requireNonNull(getCommand("arsenal"), "arsenal command is missing from plugin.yml")
                .setExecutor(command);
        getCommand("arsenal").setTabCompleter(command);

        long interval = Math.max(1L, getConfig().getLong("cooldown-display.interval-ticks", 10L));
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            if (getConfig().getBoolean("cooldown-display.enabled", true)) {
                Bukkit.getOnlinePlayers().forEach(abilityService::updateActionbar);
            }
        }, 0L, interval);
        getLogger().info("Legendary Arsenal enabled with " + WeaponId.values().length + " weapon definitions.");
    }

    public void reloadSettings() {
        reloadConfig();
        messages = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));
        resourcePackConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "resourcepack.yml"));
        if (weaponManager != null) {
            weaponManager.reload();
        }
        if (recipeManager != null) {
            recipeManager.reload();
        }
    }

    public void send(CommandSender sender, String key, String... replacements) {
        String prefix = messages.getString("messages.prefix", "");
        String text = messages.getString("messages." + key, "&cMissing message: " + key);
        for (int i = 0; i + 1 < replacements.length; i += 2) {
            text = text.replace(replacements[i], replacements[i + 1]);
        }
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + text));
    }

    public Component component(String legacyText) {
        return LegacyComponentSerializer.legacyAmpersand().deserialize(legacyText);
    }

    private void saveIfMissing(String resource) {
        if (!new File(getDataFolder(), resource).exists()) {
            saveResource(resource, false);
        }
    }

    public WeaponManager getWeaponManager() {
        return weaponManager;
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public AbilityService getAbilityService() {
        return abilityService;
    }

    public FileConfiguration getMessages() {
        return messages;
    }

    public FileConfiguration getResourcePackConfig() {
        return resourcePackConfig;
    }
}