JIM50051

make a custom weapons plugin that adds a bunch of custom weapons

Kodari AI
KodariApr 18 at 2:21 am 11,758 (v2)

I’ll create a custom weapons plugin with special abilities, custom damage, and configurable effects.

CustomWeapons
A feature-rich custom weapons system that adds powerful weapons with unique abilities and stats. Each weapon has configurable damage, attack speed, special abilities (lightning strike, lifesteal, explosive hits, fire damage), particle effects, and sound effects. Includes ability cooldowns, chance-based triggers, and full configuration support. Admins can give weapons via commands and reload configurations in-game.

All files created! The CustomWeapons plugin is now complete with 6 pre-configured weapons (Thunder Blade, Lifesteal Blade, Explosive Hammer, Flame Reaver, Frost Blade, and Holy Mace), each featuring unique abilities with cooldowns, particle effects, and sound effects. Admins can give weapons, list all available weapons, and reload configurations in-game.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 713
src/main/java/com/customweapons/CustomWeapons.java
package com.customweapons;

import com.customweapons.commands.WeaponsCommand;
import com.customweapons.listeners.WeaponListener;
import com.customweapons.managers.CooldownManager;
import com.customweapons.managers.WeaponManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CustomWeapons extends JavaPlugin {
    
    private WeaponManager weaponManager;
    private CooldownManager cooldownManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.weaponManager = new WeaponManager(this);
        this.cooldownManager = new CooldownManager();
        
        weaponManager.loadWeapons();
        
        getServer().getPluginManager().registerEvents(new WeaponListener(this), this);
        
        getCommand("weapons").setExecutor(new WeaponsCommand(this));
        
        getLogger().info("CustomWeapons has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CustomWeapons has been disabled!");
    }
}