furyplays

Create a Minecraft Spigot/Paper plugin called AjCustomWeapons. Add three default custom weapons: #Reactor Mace, #Blade of Null, and #Nightmare. Reactor Mace should strike lightning on hit, upgrade after every kill, support Wind Burst IV and Density V, and give Strength III on Shift + Right Click. Blade of Null should have a 2x damage ability on Shift + Right Click, a 10-block dash ability, and grant 2 extra hearts on Shift + Left Click. Nightmare should attack at sword speed, deal 2x damage and stun targets for 3 seconds every 5 hits, grant Strength III for 5 seconds on Shift + Right Click, and have Sharpness V by default.

All weapon abilities, names, lore, recipes, cooldowns, effects, damage values, craft limits, particles, sounds, INVENTORY GUI layout, messages, and announcements must be fully configurable in the config files. Default recipes can be added by the developer, but server owners must be able to change them. Each weapon should have a craft limit (default 2 crafts), and this limit must be configurable, including unlimited crafts if desired.

Add a INVENTORY GUI that opens with /ajcustomweapon INVENTORY GUI, showing all custom weapons, their abilities, recipes, and how many times each weapon has been crafted (for example, 1/2 Crafted). Add commands /ajweapons help, /ajweapons reload, and /ajweapons recipe.

When a custom weapon is crafted, start a configurable 5-minute event timer and broadcast a message to all players showing which weapon was crafted and the exact X, Y, and Z coordinates of the crafter.

Create a playerdata folder where a separate file is saved for every player who crafts a custom weapon. The file should store the player's UUID, username, crafted weapon names, number of crafts, craft dates, and any other relevant weapon data. This data must persist after server restarts and be used to track craft limits and weapon ownership. The plugin should also support adding new custom weapons through configuration without modifying the source code.

Kodari AI
KodariJun 7 at 11:17 am 1

I’ll create the AjCustomWeapons plugin with a fully configurable weapon system, GUI, player data tracking, and all requested features.

AjCustomWeapons
A fully configurable custom weapons plugin featuring three default weapons: Reactor Mace, Blade of Null, and Nightmare. Each weapon has unique abilities, configurable recipes, craft limits, and cooldowns. Includes an inventory GUI, player data persistence, and event broadcasting. Abilities, names, lore, recipes, sounds, particles, and messages are all configurable without modifying source code.

Starting with build and resource files:

Now the Java source files:

I need to add the XItemFlag import. Let me add it:

I need to fix the WeaponListGUI - it uses WeaponAbility but I need to import it. Let me also create the remaining files:

I need to fix CombatListener - it uses plugin.getMessages() which I didn’t create. Let me instead use the config directly. Let me also complete all files.

Wait, I referenced plugin.getWeaponListGUI() in the WeaponCommand but I need to add that getter. Let me also make sure the files are complete. Also, I need to fix the CombatListener referencing plugin.getMessages() - I’ll fix that.

Let me update the main class to include the WeaponListGUI reference, and fix any issues. Let me also reconsider the CombatListener - I should use the config directly or messages.yml for stun messages.

Let me recreate the main class with the additional getter, and fix the CombatListener:

Now let me fix the CombatListener to not use plugin.getMessages(). Let me rewrite it properly:

Now I need to add the XItemFlag import to CustomWeapon.java. Let me recreate it:

Now the WeaponListGUI needs the proper import for WeaponAbility. Let me also update the GUI to properly import XItemFlag:

Now let me also make sure the WeaponCommand properly references the plugin’s methods and that the DataManager’s imports include ConfigurationSection:

Now let me verify all files are created. I need:

  1. ✅ build.gradle

  2. ✅ src/main/resources/plugin.yml

  3. ✅ src/main/resources/config.yml

  4. ✅ src/main/resources/messages.yml

  5. ✅ src/main/java/com/ajcustomweapons/AjCustomWeapons.java

  6. ✅ src/main/java/com/ajcustomweapons/weapon/AbilityType.java

  7. ✅ src/main/java/com/ajcustomweapons/weapon/WeaponAbility.java

  8. ✅ src/main/java/com/ajcustomweapons/weapon/CustomWeapon.java

  9. ✅ src/main/java/com/ajcustomweapons/weapon/WeaponManager.java

  10. ✅ src/main/java/com/ajcustomweapons/data/PlayerWeaponData.java

  11. ✅ src/main/java/com/ajcustomweapons/data/PlayerDataManager.java

  12. ✅ src/main/java/com/ajcustomweapons/utils/MessageUtil.java

  13. ✅ src/main/java/com/ajcustomweapons/gui/GUIManager.java

  14. ✅ src/main/java/com/ajcustomweapons/gui/GUIListener.java

  15. ✅ src/main/java/com/ajcustomweapons/gui/WeaponListGUI.java

  16. ✅ src/main/java/com/ajcustomweapons/listeners/CombatListener.java

  17. ✅ src/main/java/com/ajcustomweapons/listeners/CraftListener.java

  18. ✅ src/main/java/com/ajcustomweapons/commands/WeaponCommand.java

All 18 files created. Let me do a quick review of any issues…

The CombatListener has a reference to plugin.getConfig().getString("messages.event.stunned", ...) but the stun messages are in messages.yml, not in config.yml. Let me fix the messages.yml to have the stun messages, and fix the CombatListener to use the messages.yml through MessageUtil.

Actually, looking at messages.yml, I already have:

YAML
event:
  stunned: "&c&lSTUNNED!"
  unstunned: "&aYou are no longer stunned."

So I should use plugin.getMessageUtil().getMessage("event.stunned") instead of plugin.getConfig().getString(...). Let me fix that in CombatListener.

Also, I need to look at the WeaponAbility class - it needs to have the description field. Let me check… yes, it has description field.

Let me fix the CombatListener stun section. I’ll recreate it.

Actually, let me just patch the specific section. But wait - I don’t have patch_file available in the assessment? No I do. But since we’re creating files from scratch, let me just make sure the files are right.

Actually, let me recreate the CombatListener with the fix:

All files should now be correct. Let me verify I have everything covered by reviewing the user’s requirements:

  1. ✅ Three default weapons: Reactor Mace, Blade of Null, Nightmare

  2. ✅ Reactor Mace: lightning on hit, upgrade per kill, Wind Burst IV, Density V, Strength III on Shift+Right Click

  3. ✅ Blade of Null: 2x damage on Shift+Right Click, 10-block dash, 2 extra hearts on Shift+Left Click

  4. ✅ Nightmare: sword speed (diamond sword), 2x damage + stun every 5 hits, Strength III on Shift+Right Click, Sharpness V default

  5. ✅ All abilities, names, lore, recipes, cooldowns, effects, damage values, craft limits, particles, sounds configurable

  6. ✅ Inventory GUI with /ajcustomweapon inventory

  7. ✅ Commands: /ajweapons help, /ajweapons reload, /ajweapons recipe

  8. ✅ Craft event broadcast with timer, coordinates

  9. ✅ Player data folder with per-player files

  10. ✅ Configurable craft limits (default 2, -1 for unlimited)

  11. ✅ Support for adding new weapons through config without code changes

The plugin looks comprehensive. Let me verify one more time the structure is solid.All 18 files created. Here’s a summary of the complete plugin:

Project: AjCustomWeapons — a fully configurable custom weapons plugin for Spigot/Paper 1.20+

Files created (18):

File
Purpose
build.gradle
Gradle build with Spigot API + Lombok
plugin.yml
Plugin descriptor with
ajcustomweapon
command (aliases:
ajcw
,
ajweapons
)
config.yml
Full config with 3 default weapons, GUI settings, ability configs
messages.yml
All configurable messages with placeholders
AjCustomWeapons.java
Main plugin class — initializes managers, listeners, commands
CustomWeapon.java
Weapon data class — PDC tags, recipe building, item creation
WeaponAbility.java
Ability data loaded from config — all parameters dynamically mapped
AbilityType.java
Enum: LIGHTNING_STRIKE, UPGRADE_PER_KILL, ENCHANTMENT, DASH, etc.
WeaponManager.java
Loads/registers weapons from config, manages recipe registration
PlayerWeaponData.java
Per-player craft counts, hit counts, kill counts per weapon
PlayerDataManager.java
YAML persistence in
playerdata/<uuid>.yml
GUIManager.java
Central inventory GUI handler
GUIListener.java
Event listener for GUI clicks/opens/closes
WeaponListGUI.java
Weapon list + recipe detail views
CombatListener.java
All combat abilities: lightning, fifth-hit stun, damage boosts, dash, extra hearts, strength
CraftListener.java
Craft limit enforcement, event broadcasting, timer management
WeaponCommand.java
/ajweapons help
MessageUtil.java
Color translation, placeholder replacement, message list support

Weapon abilities implemented:

  • Reactor Mace — Lightning strike on hit (configurable damage), upgrade per kill (renames item), Wind Burst IV + Density V enchantments, Strength III on Shift+Right Click (30s cooldown)

  • Blade of Null — 2× damage on Shift+Right Click (20s cd), 10-block dash (15s cd), +4 absorption hearts on Shift+Left Click (60s cd)

  • Nightmare — Every 5th hit: 2× damage + 3s stun, Strength III on Shift+Right Click (25s cd), Sharpness V default enchant

Key features:

  • All weapon properties read from config.yml — add new weapons by adding entries under weapons:

  • Craft limits per weapon (default 2, -1 for unlimited), enforced via PrepareItemCraftEvent

  • 5-minute event broadcast on craft with exact coordinates

  • Per-player data persists in playerdata/ as YAML files across restarts

  • Configurable GUI with weapon list → recipe detail navigation

  • Cooldown system per ability per player with visual feedback

  • reload command to hot-reload config without server restart

furyplays

The compilation failed with this error:

code
Compilation failed with 3 error(s):

ERROR in src/main/java/com/ajcustomweapons/listeners/CombatListener.java at line 158: cannot find symbol
        player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE,
                                                                ^
  symbol: variable INCREASE_DAMAGE
  location: class PotionEffectType

ERROR in src/main/java/com/ajcustomweapons/weapon/CustomWeapon.java at line 116: cannot find symbol
                meta.addEnchant(Enchantment.LUCK, 1, true);
                                           ^
  symbol: variable LUCK
  location: class Enchantment

ERROR in src/main/java/com/ajcustomweapons/weapon/WeaponManager.java at line 19: cannot find symbol
        for (Recipe recipe : Bukkit.getRecipes()) {
                                   ^
  symbol: method getRecipes()
  location: class Bukkit


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - getRecipes()
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/ajcustomweapons/listeners/CombatListener.java
  - src/main/java/com/ajcustomweapons/weapon/CustomWeapon.java
  - src/main/java/com/ajcustomweapons/weapon/WeaponManager.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJun 7 at 11:18 am 1

Three issues: PotionEffectType.INCREASE_DAMAGE renamed to STRENGTH in modern Spigot, Enchantment.LUCK doesn’t exist, and Bukkit.getRecipes() → Bukkit.recipeIterator(). Let me read and fix all three files

Three fixes needed: PotionEffectType.INCREASE_DAMAGE → STRENGTH (renamed in modern Spigot), Enchantment.LUCK → UNBREAKING (LUCK doesn’t exist), Bukkit.getRecipes() → Bukkit.recipeIterator()

Now the CombatListener

Now add the missing Iterator import to WeaponManager.java

java.util.* on line 8 already covers Iterator. All three fixes applied:

  • CombatListener.java:158 — INCREASE_DAMAGE → STRENGTH (renamed in 1.21+)

  • CustomWeapon.java:116 — Enchantment.LUCK → XEnchantment.matchXEnchantment("UNBREAKING") (LUCK doesn’t exist in modern Spigot)

  • WeaponManager.java:19 — Bukkit.getRecipes() → Bukkit.recipeIterator() with <Recipe> iterator (deprecated method removed)

furyplays

The compilation failed with this error:

code
Compilation failed with 2 error(s):

ERROR in src/main/java/com/ajcustomweapons/weapon/CustomWeapon.java at line 116: cannot find symbol
                XEnchantment.matchXEnchantment("UNBREAKING").ifPresent(e -> {
                ^
  symbol: variable XEnchantment
  location: class CustomWeapon

ERROR in src/main/java/com/ajcustomweapons/weapon/WeaponManager.java at line 23: cannot find symbol
                NamespacedKey key;
                ^
  symbol: class NamespacedKey
  location: class WeaponManager


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - NamespacedKey
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/ajcustomweapons/weapon/CustomWeapon.java
  - src/main/java/com/ajcustomweapons/weapon/WeaponManager.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJun 7 at 11:19 am 1

Two missing imports. Let me read the relevant sections to patch precisely.

Two missing imports. Patching both files.

Both imports added:

  • CustomWeapon.java — added import com.cryptomorin.xseries.XEnchantment;

  • WeaponManager.java — added import org.bukkit.NamespacedKey;

furyplays

Replace all %prefix% messages with &#9400FF&lA&#9706FF&lJ&#990CFF&lC&#9C12FF&lU&#9E19FF&lS&#A11FFF&lT&#A325FF&lO&#A62BFF&lM&#A931FF&lW&#AB37FF&lE&#AE3DFF&lA&#B044FF&lP&#B34AFF&lO&#B550FF&lN&#B856FF&lS, create separate INVENTORY GUI.yml, weapons.yml, and weaponlimit.yml files, move all weapon settings to weapons.yml with each weapon organized under its own section (name, material, abilities, cooldowns, effects, recipes, etc.), make the INVENTORY GUI and recipe INVENTORY GUI fully editable through INVENTORY GUI.yml, store craft limits in weaponlimit.yml, add OP-only commands /ajcustomweapons take <weapon> <player>, /ajcustomweapons take all, and /ajweapon clear all, make /ajweapon clear all remove all custom weapons from every player, reset ownership data, reset all craft counts, and change INVENTORY GUI progress back to 0/limit, ensure the INVENTORY GUI always displays live craft counts from weaponlimit.yml, and make /ajweapons reload reload config.yml, INVENTORY GUI.yml, weapons.yml, weaponlimit.yml, and all playerdata files without requiring a server restart.

Kodari AI
KodariJun 7 at 11:38 am 2

This is a large multi-part request. Let me plan and execute systematically.

Plan:

  1. Investigate project structure (all Java files and current config)

  2. Replace all %prefix% with the gradient string across all Java files

  3. Create INVENTORY GUI.yml, weapons.yml, weaponlimit.yml

  4. Move weapon config to weapons.yml, craft limits to weaponlimit.yml, GUI config to INVENTORY GUI.yml

  5. Make GUIs fully config-driven from INVENTORY GUI.yml

  6. Add OP commands: take weapon/take all/clear all

  7. Implement /ajweapon clear all with full cleanup

  8. Live craft counts from weaponlimit.yml

  9. /ajweapons reload for all configs

Let me start by exploring the project.

This is a massive refactor. Let me execute task by task.

Plan:

  1. Create INVENTORY GUI.yml, weapons.yml, weaponlimit.yml config files

  2. Update messages.yml with gradient prefix + new messages

  3. Update config.yml (remove weapons section), plugin.yml (add ajweapon alias)

  4. Rewrite MessageUtil.java — auto-replace %prefix%

  5. Rewrite WeaponManager.java — load from weapons.yml + weaponlimit.yml

  6. Rewrite CustomWeapon.java — craftLimit passed in externally

  7. Rewrite WeaponListGUI.java — full config from INVENTORY GUI.yml

  8. Rewrite AjCustomWeapons.java — enhanced reload, new configs

  9. Rewrite WeaponCommand.java — take + clear subcommands

  10. Update PlayerDataManager.java — resetAllCraftCounts, reloadAll

  11. Update PlayerWeaponData.java — reset method

Starting with config files and resource files.

Now I have full context. Let me execute every task. Starting with the new config files and updates to all Java files

Now I’ll create all the files. Starting with config resources and then all Java files.

Read-only mount — I’ll use <create> and <update> tags for all files.

<|DSML|create path=“src/main/resources/INVENTORY GUI.yml”># AjCustomWeapons Inventory GUI Configuration

All aspects of the weapon selection GUI and recipe view GUI

are fully customizable here.

Main weapon list GUI

weapon-list-gui: title: “&8Custom Weapons” rows: 3 filler: enabled: true material: “BLACK_STAINED_GLASS_PANE” name: " "

If true, weapons are centered. If false, they start from slot 0.

center-weapons: true close: slot: 49 material: “BARRIER” name: “&cClose” lore: - “&7Click to close”

Recipe view GUI (shown when clicking a weapon)

recipe-view-gui: title: “&8%weapon% &7- Details” rows: 6 filler: enabled: true material: “BLACK_STAINED_GLASS_PANE” name: " " weapon-display-slot: 13 recipe-slots: - 21 - 22 - 23 - 30 - 31 - 32 - 39 - 40 - 41 close-slot: 49 close: material: “BARRIER” name: “&cClose” lore: - “&7Click to go back”</|DSML|create>

<|DSML|create path=“src/main/resources/weapons.yml”># AjCustomWeapons Weapon Definitions

Each weapon has its own section with name/ID as the key.

All abilities, recipes, enchantments, and effects are defined here.

weapons: reactor_mace: enabled: true display_name: “&c&lReactor Mace” material: “MACE” model_data: 0 lore: - “” - “&cA legendary mace infused with reactor energy” - “&7Strikes lightning on every hit” - “&7Upgrades after each kill” - “&7Wind Burst IV & Density V” - “” - “&6&lAbility: &eShift + Right Click” - “&7Grants Strength III for 10 seconds” - “&7Cooldown: 30 seconds” - “” - “&8AjCustomWeapon” glow: true recipe: shape: - “RIR” - “IMI” - “RIR” ingredients: R: “NETHERITE_INGOT” I: “IRON_BLOCK” M: “MACE” event: timer_seconds: 300 broadcast_enabled: true broadcast_message: “&e%player% &6has crafted the &c%weapon% &6at &eX:%x% Y:%y% Z:%z%” abilities: lightning_strike: type: LIGHTNING_STRIKE enabled: true description: “Strikes lightning on hit” cooldown_seconds: 0 damage: 6.0 sound: “ENTITY_LIGHTNING_BOLT_THUNDER” sound_volume: 1.0 sound_pitch: 1.0 particle: “FLASH” particle_count: 5 upgrade_per_kill: type: UPGRADE_PER_KILL enabled: true description: “Upgrades after each kill” max_upgrades: 10 damage_per_upgrade: 0.5 display_name_format: “&c&lReactor Mace &7[+%level%]” wind_burst: type: ENCHANTMENT enabled: true enchantment: “WIND_BURST” level: 4 density: type: ENCHANTMENT enabled: true enchantment: “DENSITY” level: 5 strength_shift_right: type: STRENGTH_ON_SHIFT_RIGHT enabled: true description: “Grants Strength III on Shift+Right Click” cooldown_seconds: 30 duration_seconds: 10 amplifier: 2 sound: “ENTITY_WITHER_SHOOT” sound_volume: 1.0 sound_pitch: 0.8 particle: “SPELL_WITCH” particle_count: 15 blade_of_null: enabled: true display_name: “&8&lBlade of Null” material: “NETHERITE_SWORD” model_data: 0 lore: - “” - “&8A blade forged from the void itself” - “&7Shift + Right Click: 2x damage (20s cooldown)” - “&7Dash ability: 10 blocks (15s cooldown)” - “&7Shift + Left Click: +2 extra hearts (60s cooldown)” - “” - “&8AjCustomWeapon” glow: true recipe: shape: - “E N” - " S " - " O " ingredients: E: “END_CRYSTAL” N: “NETHERITE_INGOT” S: “NETHERITE_SWORD” O: “OBSIDIAN” event: timer_seconds: 300 broadcast_enabled: true broadcast_message: “&e%player% &6has crafted the &8%weapon% &6at &eX:%x% Y:%y% Z:%z%” abilities: damage_boost_shift_right: type: DAMAGE_BOOST_ON_SHIFT_RIGHT enabled: true description: “2x damage on Shift+Right Click” cooldown_seconds: 20 duration_seconds: 5 multiplier: 2.0 sound: “ENTITY_ENDERMAN_TELEPORT” sound_volume: 1.0 sound_pitch: 1.2 particle: “PORTAL” particle_count: 20 dash: type: DASH enabled: true description: “10-block dash” cooldown_seconds: 15 distance: 10 sound: “ENTITY_ENDER_DRAGON_FLAP” sound_volume: 1.0 sound_pitch: 1.5 particle: “DRAGON_BREATH” particle_count: 30 extra_hearts_shift_left: type: EXTRA_HEARTS_ON_SHIFT_LEFT enabled: true description: “+2 extra hearts on Shift+Left Click” cooldown_seconds: 60 duration_seconds: 30 hearts: 4.0 sound: “ENTITY_PLAYER_LEVELUP” sound_volume: 1.0 sound_pitch: 1.0 particle: “HEART” particle_count: 10 nightmare: enabled: true display_name: “&5&lNightmare” material: “DIAMOND_SWORD” model_data: 0 lore: - “” - “&5A sword that feeds on fear” - “&7Every 5th hit: 2x damage + stun for 3 seconds” - “&7Shift + Right Click: Strength III for 5 seconds” - “&7Sharpness V by default” - “” - “&8AjCustomWeapon” glow: true recipe: shape: - “BBB” - “BDB” - “OSO” ingredients: B: “BONE” D: “DIAMOND_SWORD” O: “OBSIDIAN” S: “NETHER_STAR” event: timer_seconds: 300 broadcast_enabled: true broadcast_message: “&e%player% &6has crafted the &5%weapon% &6at &eX:%x% Y:%y% Z:%z%” abilities: fifth_hit_stun: type: EVERY_FIFTH_HIT enabled: true description: “2x damage + stun for 3 seconds every 5 hits” hits_required: 5 damage_multiplier: 2.0 stun_duration_seconds: 3 sound: “ENTITY_WITHER_HURT” sound_volume: 1.0 sound_pitch: 0.5 particle: “SOUL_FIRE_FLAME” particle_count: 20 strength_shift_right: type: STRENGTH_ON_SHIFT_RIGHT enabled: true description: “Grants Strength III on Shift+Right Click” cooldown_seconds: 25 duration_seconds: 5 amplifier: 2 sound: “ENTITY_WITHER_SHOOT” sound_volume: 1.0 sound_pitch: 0.9 particle: “SMOKE_LARGE” particle_count: 15 sharpness: type: ENCHANTMENT enabled: true enchantment: “SHARPNESS” level: 5</|DSML|create>

<|DSML|create path=“src/main/resources/weaponlimit.yml”># AjCustomWeapons Craft Limits

Defines how many times each player can craft each weapon.

-1 = unlimited, 0 = disabled, any positive number = max crafts per player

craft-limits: reactor_mace: 2 blade_of_null: 2 nightmare: 2</|DSML|create>

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
18 1,828
src/main/java/com/ajcustomweapons/AjCustomWeapons.java
package com.ajcustomweapons;

import com.ajcustomweapons.commands.WeaponCommand;
import com.ajcustomweapons.data.PlayerDataManager;
import com.ajcustomweapons.gui.GUIListener;
import com.ajcustomweapons.gui.GUIManager;
import com.ajcustomweapons.gui.WeaponListGUI;
import com.ajcustomweapons.listeners.CombatListener;
import com.ajcustomweapons.listeners.CraftListener;
import com.ajcustomweapons.utils.MessageUtil;
import com.ajcustomweapons.weapon.WeaponManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class AjCustomWeapons extends JavaPlugin {
    private static AjCustomWeapons instance;
    private WeaponManager weaponManager;
    private PlayerDataManager playerDataManager;
    private GUIManager guiManager;
    private WeaponListGUI weaponListGUI;
    private MessageUtil messageUtil;

    @Override
    public void onEnable() {
        instance = this;

        saveDefaultConfig();
        saveResource("messages.yml", false);

        this.messageUtil = new MessageUtil(this);
        this.weaponManager = new WeaponManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.guiManager = new GUIManager();
        this.weaponListGUI = new WeaponListGUI(this, guiManager);

        weaponManager.loadWeapons();

        getCommand("ajcustomweapon").setExecutor(new WeaponCommand(this));

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CraftListener(this), this);

        getLogger().info("AjCustomWeapons v" + getDescription().getVersion() + " enabled!");
    }

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

    public static AjCustomWeapons getInstance() {
        return instance;
    }

    public WeaponManager getWeaponManager() {
        return weaponManager;
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }

    public WeaponListGUI getWeaponListGUI() {
        return weaponListGUI;
    }

    public MessageUtil getMessageUtil() {
        return messageUtil;
    }

    public void reload() {
        reloadConfig();
        messageUtil.reload();
        weaponManager.loadWeapons();
    }
}