6adc

can you make me a minecraft java plugin, that adds items like "Dash Mace" with the gradient green fading into navy blue, that has the ability to dash the player 15-25 blocks in the direction they are looking, then add a dash sword that has the gradient of white fading to black with the same ability as the dash mace but make the dashes 15-20 blocks, then add a cobweb axe with the name "🕸️ Cobweb Axe" with the gradient grey to black then add a sword with the name "Draining Blade" that has the ability to effect the enemy with hunger 2 for 5 seconds weakness 2 for 5 seconds slowness 5 for 5 seconds, then add me a sword with the name "Zeus's Thunderblade" that has a chance to summon lightning on the enemy upon hit. Make me a dash spear that has the exact same ability as the dash mace but make the gradient red to orange make a stun axe with the name "Stun Axe" that freezes players in a state where they cannot look around they cannot interact with people and cannot move. then make a axe called "Regen Axe" that effects the holder with regeneration then make a axe called "Coffee Axe" which when held effects the holder with speed 3 and regeneration 1 with the gradient brown to black. make a cooldown INVENTORY INVENTORY GUI thats similar to this with the same colours as the tools make the cooldown INVENTORY INVENTORY GUI have matching colors this plugin is made for the 1.21.11 tricky trials update in minecraft java edition with commands like /cw INVENTORY INVENTORY GUI which shows all weapons and there abilities when clicked. then when ran a command like this "/cw give "user" "item". then make the dash sword into a netherite sword make the dash spear a netherite spear the cobweb axe netherite axe the stun axe netherite axe the regen axe netherite axe and the coffee axe netherite axe and then make it so all abilitys are shift right click and then fix the plugin.yml so it has a command executor and make sure the velicity is the same as 3.5-5.0

Kodari AI
KodariJul 5 at 9:35 pm 2

I’ll create the CustomWeapons plugin — a full-featured weapon system with gradient items, dash abilities, debuffs, stuns, passive effects, and a cooldown GUI.

CustomWeapons
A Minecraft 1.21.1 Paper plugin adding 9 unique weapons with shift-right-click abilities. Features include dash weapons with gradient colors, cobweb placement, debuff application, lightning strikes, player stunning, and passive regeneration/speed effects. Includes a cooldown GUI showing all weapons with matching gradient colors and a /cw command system for management.

Wait, I need to update the plugin class to have the GUI inventory tracking map. Let me also need to handle GUI clicks somewhere. Let me re-create the plugin class and add a GUI click handler.

Actually, I need to add a getGUIInventories() method to the plugin. Let me update the plugin class.

Actually, it would be cleaner to handle GUI clicks in the same listener or in a separate handler. Let me just track open GUIs via a HashSet in the plugin and handle click events in WeaponListener.

Let me recreate the affected files.

Actually, let me think about this more carefully. The GUI click handling needs to:

  1. Check if the clicked inventory is a weapon GUI

  2. If so, cancel the event

  3. Provide ability info to the player

I’ll track open GUIs in a Set<Player> since the inventory reference isn’t reliable across server reloads.

Let me update CustomWeaponsPlugin.java and WeaponListener.java.

Also, I notice I’m using plugin.getGUIInventories() which doesn’t exist. Let me fix that.

Let me re-create the CustomWeaponsPlugin with the GUI tracking, and update the WeaponListener to handle GUI clicks.

Let me recreate the plugin and WeaponGUI files properly.I need to fix the GUI handling. Let me update the plugin to track open GUIs and handle GUI clicks properly.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
14 890
src/main/java/com/customweapons/CustomWeaponsPlugin.java
package com.customweapons;

import com.customweapons.command.CustomWeaponCommand;
import com.customweapons.listener.StunListener;
import com.customweapons.listener.WeaponListener;
import com.customweapons.manager.CooldownManager;
import com.customweapons.manager.StunManager;
import com.customweapons.items.WeaponRegistry;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

public class CustomWeaponsPlugin extends JavaPlugin {

    private CooldownManager cooldownManager;
    private StunManager stunManager;
    private WeaponRegistry weaponRegistry;
    private final Set<UUID> guiViewers = new HashSet<>();

    @Override
    public void onEnable() {
        this.cooldownManager = new CooldownManager();
        this.stunManager = new StunManager();
        this.weaponRegistry = new WeaponRegistry(this);

        getCommand("customweapons").setExecutor(new CustomWeaponCommand(this));

        Bukkit.getPluginManager().registerEvents(new WeaponListener(this), this);
        Bukkit.getPluginManager().registerEvents(new StunListener(this), this);

        startPassiveEffectTask();
    }

    @Override
    public void onDisable() {
        this.cooldownManager.clearAll();
        this.stunManager.unstunAll();
        this.guiViewers.clear();
    }

    private void startPassiveEffectTask() {
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            for (Player player : Bukkit.getOnlinePlayers()) {
                weaponRegistry.applyPassiveEffects(player);
            }
        }, 0L, 20L);
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public StunManager getStunManager() {
        return stunManager;
    }

    public WeaponRegistry getWeaponRegistry() {
        return weaponRegistry;
    }

    public Set<UUID> getGuiViewers() {
        return guiViewers;
    }
}