dragonxspider

Yoo mere liye ek minecraft plugin bana sakte ho jiska version 1.21.11 ho. ---------------------------------- And Plugin pe ye sare weapons hona chahiye ------------------------------------

  1. Thunder Blade -- Netherite Sword -- Coldown= 3 second
  2. Sonic Blade -- Netherite Sword -- Coldown= 1 mint
  3. Auto Bow -- Bow -- Coldown= 20 second
  4. Dragon Blade -- Netherite Sword -- Coldown= 15 second

--------------------------------------- Sab weapons and weapons ka abilities ---------------------------------------

  1. Thunder Blade= her ek critical parte hi jis player ko hit kiya us player ke uper lightning gire.
  2. Sonic Blade= Snick+Right Click pe warden ka Sonic Boom Shoot ho jaha wo dekh raha hai waha.
  3. Auto Bow= 1 arrow shoot karne pe 10 arrow ek sath shoot ho inventory pe arrow ho ya na ho phir bhi shoot hona chahiye.
  4. Dragon Blade= Snick+Right Click pe dragon breath shoot ho jaha wo dekh raha ho waha shoot hona chahiye.

------------------------------------ Or is sab weapons pe sab enchantments bhi laga hona chahiye sab weapons main max enchantments and is sab weapons ko lene ke liye ye command run karna padega ------------------------------------ /slimew — isse ek INVENTORY GUI open hoga or uspe sab weapons rahe and kisi bhi weapons ko lene ke liye left click karna padega and left click karne ke baad uske inventory main ajaye weapon. Or ye Op only command ho ------------------------------------ And sab weapons ke lore pe kaise use karna hai ye weapons wo likha hua ho like (Snick+Right Click to Shoot) aise.

And ek separate Rechorch Pack bhi bana dena is is sab weapons ka 1.21.11 ke liye. And is plugin ka name "SlimeMc" and "made by dragonxspider" -------------------------------- And jab ye plugin kisi minecraft server upload ho jaye phir server ko start karne ke baad console pe ye plugin details/motd aye ----------------------------------- -- Slime Mc Official Plugin -- Made by dragonxspider -- Support: https://discord.gg/kFNd2EDJNN -----------------------------------

Kodari AI
KodariJan 27 at 5:05 am 13,177 (v2)

I’ll create a custom weapons plugin with GUI and abilities for Minecraft 1.21.1.

SlimeMc
Advanced custom weapons plugin featuring four unique weapons with special abilities: Thunder Blade (lightning strikes on critical hits), Sonic Blade (warden sonic boom attack), Auto Bow (shoots 10 arrows at once), and Dragon Blade (shoots dragon breath). Each weapon has cooldown-based abilities activated via sneak+right click or combat actions. Includes GUI-based weapon selection menu accessible via /slimew command for operators.

I’ll create:

  • 4 custom weapons with max enchantments and lore

  • Ability system with cooldowns

  • GUI inventory system for weapon selection

  • Resource pack structure for custom textures

  • OP-only command system

Plugin complete!

Features:

  • ⚡ Thunder Blade: Lightning strikes on critical hits (3s cooldown)

  • 💜 Sonic Blade: Warden sonic boom on Sneak+Right Click (1 min cooldown)

  • 🏹 Auto Bow: Shoots 10 arrows at once, no arrows needed (20s cooldown)

  • 🐉 Dragon Blade: Dragon breath projectile on Sneak+Right Click (15s cooldown)

Command: /slimew (OP only) - Opens GUI with all weapons

Console Message: Displays plugin banner on startup with your Discord link

Resource Pack: Included structure in resourcepack/ folder - add your custom PNG textures and ZIP it for use

All weapons have max enchantments, custom lore with usage instructions, and are unbreakable!

dragonxspider

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 36 error(s):

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 155: cannot find symbol
            XEnchantment.SHARPNESS.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 156: cannot find symbol
            XEnchantment.FIRE_ASPECT.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                                 ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 157: cannot find symbol
            XEnchantment.KNOCKBACK.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 158: cannot find symbol
            XEnchantment.LOOTING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 159: cannot find symbol
            XEnchantment.SWEEPING_EDGE.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                   ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 160: cannot find symbol
            XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 161: cannot find symbol
            XEnchantment.MENDING.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 163: cannot find symbol
            XEnchantment.POWER.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 164: cannot find symbol
            XEnchantment.PUNCH.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 165: cannot find symbol
            XEnchantment.FLAME.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 166: cannot find symbol
            XEnchantment.INFINITY.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                              ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 167: cannot find symbol
            XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 155: cannot find symbol
              XEnchantment.SHARPNESS.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                                 ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 156: cannot find symbol
              XEnchantment.FIRE_ASPECT.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                                   ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 157: cannot find symbol
              XEnchantment.KNOCKBACK.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                                 ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 158: cannot find symbol
              XEnchantment.LOOTING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 159: cannot find symbol
              XEnchantment.SWEEPING_EDGE.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                     ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 160: cannot find symbol
              XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                  ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 161: cannot find symbol
              XEnchantment.MENDING.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 163: cannot find symbol
              XEnchantment.POWER.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 164: cannot find symbol
              XEnchantment.PUNCH.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 165: cannot find symbol
              XEnchantment.FLAME.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 166: cannot find symbol
              XEnchantment.INFINITY.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                                ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 167: cannot find symbol
              XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                  ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 155: cannot find symbol
            XEnchantment.SHARPNESS.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 156: cannot find symbol
            XEnchantment.FIRE_ASPECT.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                                 ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 157: cannot find symbol
            XEnchantment.KNOCKBACK.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                               ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 158: cannot find symbol
            XEnchantment.LOOTING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 159: cannot find symbol
            XEnchantment.SWEEPING_EDGE.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                   ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 160: cannot find symbol
            XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 161: cannot find symbol
            XEnchantment.MENDING.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                             ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 163: cannot find symbol
            XEnchantment.POWER.getEnchant().ifPresent(e -> meta.addEnchant(e, 5, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 164: cannot find symbol
            XEnchantment.PUNCH.getEnchant().ifPresent(e -> meta.addEnchant(e, 2, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 165: cannot find symbol
            XEnchantment.FLAME.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                           ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 166: cannot find symbol
            XEnchantment.INFINITY.getEnchant().ifPresent(e -> meta.addEnchant(e, 1, true));
                                              ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment

ERROR in src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java at line 167: cannot find symbol
            XEnchantment.UNBREAKING.getEnchant().ifPresent(e -> meta.addEnchant(e, 3, true));
                                                ^
  symbol: method ifPresent((e)->meta.[...]true))
  location: class Enchantment


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - ifPresent((e)->meta.[...]true))
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java
  -   src/main/java/com/dragonxspider/slimemc/manager/WeaponManager.java
 exceeds maximum 

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

Kodari AI
KodariJan 27 at 5:07 am 12,777 (v2)

Analysis

The error is clear: XEnchantment.SHARPNESS.getEnchant() returns Enchantment (not Optional<Enchantment>), so calling .ifPresent() on it fails. The correct XSeries pattern is to use XEnchantment.matchXEnchantment() which returns Optional<XEnchantment>, then call .getEnchant() inside the lambda.

Fix

Fixed: Changed from XEnchantment.SHARPNESS.getEnchant().ifPresent() to XEnchantment.matchXEnchantment("SHARPNESS").ifPresent(e -> meta.addEnchant(e.getEnchant(), ...)) for all enchantments.

Kodari can make mistakes. Review important code before using.
Files
resourcepack
src
build.gradle
manifest.kod
settings.gradle
Code
25 938
src/main/java/com/dragonxspider/slimemc/SlimeMc.java
package com.dragonxspider.slimemc;

import com.dragonxspider.slimemc.command.WeaponCommand;
import com.dragonxspider.slimemc.inventory.gui.GUIListener;
import com.dragonxspider.slimemc.inventory.gui.GUIManager;
import com.dragonxspider.slimemc.listener.WeaponAbilityListener;
import com.dragonxspider.slimemc.manager.WeaponManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SlimeMc extends JavaPlugin {
    private GUIManager guiManager;
    private WeaponManager weaponManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.guiManager = new GUIManager();
        this.weaponManager = new WeaponManager(this);
        
        registerCommands();
        registerListeners();
        
        printStartupBanner();
    }
    
    @Override
    public void onDisable() {
        getLogger().info("SlimeMc has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("slimew").setExecutor(new WeaponCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new WeaponAbilityListener(this), this);
    }
    
    private void printStartupBanner() {
        Bukkit.getConsoleSender().sendMessage("§8§m-------------------------------------");
        Bukkit.getConsoleSender().sendMessage("§b§l-- Slime Mc Official Plugin");
        Bukkit.getConsoleSender().sendMessage("§e§l-- Made by dragonxspider");
        Bukkit.getConsoleSender().sendMessage("§a§l-- Support: §fhttps://discord.gg/kFNd2EDJNN");
        Bukkit.getConsoleSender().sendMessage("§8§m-------------------------------------");
    }
}