gamer_om_56
  1. Custom Weapons

The plugin should include multiple custom weapons.

Each weapon should have unique abilities, damage, or special effects.

  1. Random Role System

When a player joins or enters the game, they should automatically receive one random role.

Each role should give the player one random custom weapon.

  1. One-Time Custom Item

Players should receive a custom weapon only once when they join the server for the first time.

If the player leaves and rejoins, they should not receive another weapon automatically.

Each player can only have one custom weapon at a time.

  1. Weapon Upgrade System

Players should be able to upgrade their weapon.

Weapons should have 3 levels:

Level 1 – Basic weapon

Level 2 – Stronger version

Level 3 – Maximum power

Upgrades can be based on kills, coins, or commands.

  1. Custom Textures

The plugin should include custom textures for the weapons.

Each weapon should look different from normal Minecraft items.

Textures can be done using CustomModelData or resource pack support.

The plugin should either:

Include a resource pack, or

Support adding custom textures easily.

  1. Configuration

Weapons, roles, damage, upgrades, and textures should be editable in a config file.

Server admins should be able to add new weapons easily.

  1. Commands & Permissions

Example commands:

/weapon give <player> – Give a custom weapon

/weapon upgrade – Upgrade the player's weapon

/weapon reload – Reload the plugin config

Permissions should be included for admins.

  1. Compatibility

Should work with **Minecraft Java Edition servers.

Compatible with Minecraft 1.20+ if possible.

  1. Optional Features

Cooldown system for abilities

Action bar message showing weapon name and level

Particle or sound effects when using abilities

Kodari AI
KodariMar 12 at 5:16 am 19,657 (v2)

I’ll create a custom weapons plugin with role-based distribution, upgrade system, and unique abilities.

CustomWeapons
A comprehensive custom weapons plugin featuring role-based random weapon distribution, three-tier upgrade system, and unique abilities. Players receive one random weapon upon first join based on their assigned role. Includes custom model data support, configurable damage and effects, cooldown management, and full admin control via commands. Perfect for RPG and PvP servers.

Plan

  • Create data classes for weapons, roles, player data, and abilities

  • Build managers for weapon/role loading, player data, upgrades, and cooldowns

  • Add listeners for first join, weapon abilities, and custom damage

  • Implement commands for admin control

  • Create comprehensive config with example weapons and roles

All files created successfully! The plugin features:

Core Systems:

  • Random role assignment on first join with weapon distribution

  • 3-level weapon upgrade system based on kills

  • Custom abilities with cooldowns (dash, fireball, lightning, heal, strength, explosion, freeze)

  • Custom damage handling and model data support

6 Pre-configured Weapons:

  • Warrior’s Blade (dash ability)

  • Mage’s Staff (fireball)

  • Assassin’s Dagger (strength boost)

  • Thunder Hammer (lightning strike)

  • Healer’s Wand (self-heal)

  • Ice Spear (freeze enemies)

Commands:

  • /weapon give <player> [weapon] [level] - Admin weapon giving

  • /weapon upgrade - Force upgrade weapon

  • /weapon info - View weapon stats and progress

  • /weapon reload - Reload configuration

Features:

  • One-time weapon giving on first join

  • Automatic upgrades at kill thresholds

  • Action bar cooldown display

  • Particle and sound effects

  • Full configuration support

Admins need to create a resource pack with CustomModelData values matching the config (1001-1003 for warrior sword, 2001-2003 for mage staff, etc.).

gamer_om_56

can you make a in build texture pack in it

Kodari AI
KodariMar 12 at 5:20 am 14,719 (v2)

I’ll add an in-build texture pack system to your CustomWeapons plugin. Let me first read the existing files to understand the structure.

I’ll add a built-in texture pack system to your CustomWeapons plugin with resource pack generation and serving capabilities.

Now I’ll create a complete built-in resource pack system with auto-generation:

Built-in texture pack system added with these features:

Features:

  • Auto-generates resource pack structure on plugin startup

  • Creates model JSON files for all weapons with CustomModelData

  • Generates pack.mcmeta and directory structure

  • Creates README and guide for adding textures

  • Export to ZIP command for easy distribution

Commands:

  • /weapon pack generate - Regenerate pack files

  • /weapon pack export - Export pack to ZIP file

  • /weapon pack folder - Show folder locations

Folder Structure:

Plain Text
plugins/CustomWeapons/resourcepack/
  pack.mcmeta
  assets/minecraft/
    models/item/ (auto-generated model JSONs)
    textures/item/ (place your texture PNGs here)

Workflow:

  1. Plugin generates structure automatically

  2. Add your texture PNGs to textures/item/ folder (see README.txt for filenames)

  3. Use /weapon pack export to create ZIP

  4. Upload ZIP to hosting and distribute to players

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
21 1,554
src/main/java/com/example/customweapons/CustomWeapons.java
package com.example.customweapons;

import com.example.customweapons.command.WeaponCommand;
import com.example.customweapons.listener.DamageListener;
import com.example.customweapons.listener.JoinListener;
import com.example.customweapons.listener.WeaponListener;
import com.example.customweapons.manager.CooldownManager;
import com.example.customweapons.manager.PlayerDataManager;
import com.example.customweapons.manager.ResourcePackManager;
import com.example.customweapons.manager.RoleManager;
import com.example.customweapons.manager.UpgradeManager;
import com.example.customweapons.manager.WeaponManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CustomWeapons extends JavaPlugin {
    private WeaponManager weaponManager;
    private RoleManager roleManager;
    private PlayerDataManager playerDataManager;
    private UpgradeManager upgradeManager;
    private CooldownManager cooldownManager;
    private ResourcePackManager resourcePackManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.weaponManager = new WeaponManager(this);
        this.roleManager = new RoleManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.upgradeManager = new UpgradeManager(this);
        this.cooldownManager = new CooldownManager();
        this.resourcePackManager = new ResourcePackManager(this);
        
        resourcePackManager.generateResourcePack();
        
        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new WeaponListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DamageListener(this), this);
        
        getCommand("weapon").setExecutor(new WeaponCommand(this));
        
        getLogger().info("CustomWeapons enabled!");
    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAllData();
        }
        getLogger().info("CustomWeapons disabled!");
    }
}