aris_manji
📎 1 file 17,664 chars
📄
pasted-code-1783777594319.txt
txt 158 lines
▶
Act as an expert Minecraft Spigot/Paper Plugin Developer. Write a complete, highly optimized Java plugin for Minecraft 1.20+ named "Aris Weapons". The plugin must implement 17 custom weapons with advanced configurations, complex input-triggered abilities, and a high-stakes world ritual system upon crafting.

### 1. General Architecture & Dynamic Configuration (`config.yml`)
- All 17 weapons must be entirely defined in a `config.yml` file. 
- **Absolute Configuration Requirement:** Every single weapon's `display-name`, `custom-model-data` (integer), `base-damage`, `base-speed`, `lore` list, and `crafting-recipe` (shaped matrix) must be changeable. 
- **Dynamic Variable Requirements:** Every individual weapon ability's **cooldown (seconds)**, **status effect type**, and **effect duration (seconds)** must be parsed directly from the config block for that weapon. The plugin code must reference these config keys rather than hardcoding any values.
- **Strict Weapon Attack Speed Rule:** All weapons must retain their **exact standard vanilla Minecraft attack speeds** via Generic Attributes (`Attribute.GENERIC_ATTACK_SPEED`). The only exception to this rule is the **Err0r Blade**, which must be explicitly given a modified hyper-fast attack speed (e.g., set to an absolute modifier value of 16.0 or higher to eliminate the attack cooldown entirely). All other 16 weapons must strike at normal vanilla rates unless their base-speed config value is modified.
- **Global Lock Rule:** By default, each custom weapon can only be successfully crafted **once per server life**. When a player crafts a weapon, the plugin must set `already-crafted: true` in the config, saving it immediately. Further attempts by any player to craft that specific item must be cancelled/blocked unless an admin resets it.

### 2. Admin Commands (Permission: `arisweapons.admin`)
- `/weapons view` - Opens a chest INVENTORY GUI containing all 17 custom weapons for previewing textures and lore.
- `/weapons give [player_name] [weapon_name]` - Gives the target player the specified custom weapon.
- `/weapons reset [weapon_name]` - Changes the `already-crafted` status back to `false` for that weapon in the config, allowing it to be crafted exactly one more time by players.

### 3. Ability Mechanics & Custom Trigger Inputs
Every single one of the 17 custom weapons (Swords, Axes, Maces, Bows, and Crossbows) possesses **1 Passive Ability** and **3 Active Abilities**.
- **Passive Ability:** Permanently active while the weapon is held in the main hand.
- **Ability 1 (Primary):** Activated by pressing **SHIFT + RIGHT-CLICK**. Cooldown read from config.
- **Ability 2 (Primary):** Activated by pressing **SHIFT + LEFT-CLICK**. Cooldown read from config.
- **Ability 3 (Ultimate):** Activated by pressing **SHIFT + OFFHAND SWAP KEY (F)**. Cancel the default client-side offhand item swap event when this triggers. Cooldown read from config (defaulting to 60s).

### 4. Custom Hover Lore Theme (Altar SMP Style)
The item lore style must use sharp borders, bold key-indicators, and a clean theme that makes activation paths immediately clear. The placeholder values inside the brackets must pull directly from the weapon's configuration values:
&8┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
&8┃ &6&l✨ PASSIVE EFFECT ✨
&8┃ &e[Passive Name]
&8┃ &7[Detailed description of the passive]
&8┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
&8┃ &b&l⚡ ABILITY I &7(SHIFT + RIGHT-CLICK)
&8┃ &3Name: &f[Ability 1 Name]
&8┃ &3Cooldown: &b[%ability1_cooldown%]s
&8┃ &7[Description of mechanics]
&8┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
&8┃ &b&l⚡ ABILITY II &7(SHIFT + LEFT-CLICK)
&8┃ &3Name: &f[Ability 2 Name]
&8┃ &3Cooldown: &b[%ability2_cooldown%]s
&8┃ &7[Description of mechanics]
&8┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
&8┃ &d&l🔥 ULTIMATE ABILITY &7(SHIFT + F)
&8┃ &5Name: &f[Ability 3 Name]
&8┃ &5Cooldown: &d[%ability3_cooldown%]s
&8┃ &7[Description of destructive ultimate mechanic]
&8┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

### 5. Full Roster of All 17 Custom Weapons & Mechanics
Implement the following configurations, item bases, and ability mechanics (pulling all times, effects, and durations from config fields):

1. **Err0r Blade** (Netherite Sword | CustomModelData: 10001)
   - *Weapon Stats:* Hyper-Fast Attack Speed (Bypasses vanilla attack cooldown entirely).
   - *Passive (Glitch Step):* Attacks have a configured chance to inflict Blindness II and Slowness III on targets for a configurable duration (default: 10 seconds).
   - *Ability 1:* Matrix Blink - Teleports the user X blocks forward in their looking direction. (Configurable cooldown, default: 10s)
   - *Ability 2:* Corrupt Wave - Unleashes a visual particle shockwave knocking back all enemies within a configurable radius. (Configurable cooldown, default: 15s)
   - *Ability 3:* System Crash - Forces the target's crosshair to jitter wildly, strips their armor attributes, and deals heavy void damage continuously over a configurable duration (default: 15 seconds). (Configurable cooldown, default: 60s)

2. **LifeStealer Blade** (Netherite Sword | CustomModelData: 10002)
   - *Weapon Stats:* Normal vanilla sword attack speed.
   - *Passive (Blood Feast):* Heals the wielder for a configured percentage of all physical melee damage dealt. Additionally, when the wielder kills a player, they permanently increase their maximum health attribute by a configurable value (default: 2.0 max health / 1 heart).
   - *Ability 1:* Siphon Speed - Steals movement speed from the target, slowing them and speeding up the user for a configurable duration. (Configurable cooldown)
   - *Ability 2:* Vampiric Aura - Spawns particles in a radius; drains a configurable amount of health per second from nearby entities for a configurable duration. (Configurable cooldown)
   - *Ability 3:* Heart Squeeze - Instantly executes any target hit who is below a configured maximum health percentage, instantly restoring the wielder's health bar to full. (Configurable cooldown, default: 60s)

3. **Vortex Mace** (Mace | CustomModelData: 10003)
   - *Passive:* Heavy Mass - Attacks deal a configured percentage more knockback naturally.
   - *Ability 1:* Vacuum Pull - Pulls all enemies within a configurable radius directly toward the user. (Configurable cooldown)
   - *Ability 2:* Ground Slam - Launches the user up, then creates a destructive shockwave when they hit the ground. (Configurable cooldown)
   - *Ability 3:* Singularity - Spawns a gravitational vortex pulling enemies in and exploding after a configured duration for massive damage. (Configurable cooldown, default: 60s)

4. **Shadow Axe** (Netherite Axe | CustomModelData: 10004)
   - *Passive:* Shrouded - Configurable speed buff while held during night hours.
   - *Ability 1:* Shadow Step - Become invisible and completely silent for a configurable duration. (Configurable cooldown)
   - *Ability 2:* Eviscerate - A sweeping strike that causes affected enemies to bleed for a configurable duration. (Configurable cooldown)
   - *Ability 3:* Umbral Execution - Strikes the ground to blind all players within a configured radius for a configured duration and increases the axe's attack damage by a configured percentage during that window. (Configurable cooldown, default: 60s)

5. **Inferno Bow** (Bow | CustomModelData: 10005)
   - *Passive:* Magma Core - Automatically sets fired arrows on fire and grants configurable permanent fire effects.
   - *Ability 1:* Volcanic Shot - The next arrow fired erupts into a pool of lava upon impact for a configurable duration. (Configurable cooldown)
   - *Ability 2:* Flame Burst - Emits a ring of fire particles pushing back and burning all nearby melee attackers. (Configurable cooldown)
   - *Ability 3:* Meteor Shower - Shoots an arrow into the sky to call down a configured number of explosive fireballs at the target location. (Configurable cooldown, default: 60s)

6. **Tidal Crossbow** (Crossbow | CustomModelData: 10006)
   - *Passive:* Deep Current - Projectiles deal a configured damage multiplier to targets currently touching water or rain.
   - *Ability 1:* Water Spout - Fires a high-pressure water stream that traps the target inside a temporary block of water for a configured duration. (Configurable cooldown)
   - *Ability 2:* Undow Surge - Grants the user a configurable speed/buff burst for a configured duration. (Configurable cooldown)
   - *Ability 3:* Tsunami Bolt - Fires a massive piercing wave that knocks back all entities in a long line and deals heavy damage. (Configurable cooldown, default: 60s)

7. **Void Cleaver** (Netherite Axe | CustomModelData: 10007)
   - *Passive:* Abyssal Edge - Melee attacks bypass a configured percentage of the target's armor protection.
   - *Ability 1:* Rift Slice - Tears open a small portal, damaging all enemies in a configured line forward. (Configurable cooldown)
   - *Ability 2:* Gravity Well - Distorts space around the user, slowing down all incoming enemy projectiles. (Configurable cooldown)
   - *Ability 3:* Event Horizon - Creates a localized black hole zone for a configured duration, trapping and silencing all enemies inside. (Configurable cooldown, default: 60s)

8. **Storm Mace** (Mace | CustomModelData: 10008)
   - *Passive:* Conductive - Gives the user configurable status resistances and immunity to lightning damage.
   - *Ability 1:* Spark Chain - Fires an electric bolt that jumps across up to a configured number of nearby enemies, shocking them. (Configurable cooldown)
   - *Ability 2:* Overcharge - Increases attack speed by a configured percentage for a configured duration. (Configurable cooldown)
   - *Ability 3:* Tempest Wrath - Strikes the ground to call down a configured number of devastating lightning bolts around the user. (Configurable cooldown, default: 60s)

9. **Frostbite Rapier** (Netherite Sword | CustomModelData: 10009)
   - *Passive (Chilling Touch):* Striking an enemy applies Slowness I to the target for a configurable duration. **The wielder must remain completely immune to this effect.**
   - *Ability 1:* Ice Spike - Summons a line of sharp ice structures out of the ground to impale and lift enemies. (Configurable cooldown)
   - *Ability 2:* Glacial Shield - Spawns a barrier of ice particles that absorbs the next incoming physical attack entirely. (Configurable cooldown)
   - *Ability 3:* Flash Freeze - **Wielder Immunity Fix:** Instantly freezes all target players and mobs in a configured radius solid in ice for a configurable duration (default: 10 seconds). **The player wielding the Frostbite Rapier must be completely exempt/immune from being frozen or slowed by this ultimate.** (Configurable cooldown, default: 60s)

10. **Soul Reaper** (Netherite Axe | CustomModelData: 10010)
    - *Passive:* Harvest - Killing a mob/player grants Soul stacks up to a configured maximum. Each stack grants a configured Attack Damage bonus.
    - *Ability 1:* Soul Projectile - Consumes a configured number of Soul stacks to fire a homing projectile. (Configurable cooldown)
    - *Ability 2:* Ghastly Veil - Consumes a configured number of Soul stacks to grant a temporary shield. (Configurable cooldown)
    - *Ability 3:* Specter Form - Consumes all active Soul stacks to grant complete invincibility and flight for a configured duration. (Configurable cooldown, default: 60s)

11. **Venomous Fang** (Netherite Sword | CustomModelData: 10011)
    - *Passive:* Toxic Coat - Attacks have a configured chance to inflict Poison for a configured duration.
    - *Ability 1:* Miasma Cloud - Spawns a cloud of poison particles that damages anyone who stands inside it. (Configurable cooldown)
    - *Ability 2:* Neurotoxin - Striking a target removes their ability to sprint for a configured duration. (Configurable cooldown)
    - *Ability 3:* Plague Outbreak - Inflicts a lethal infection on a target that spreads to adjacent players if they touch. (Configurable cooldown, default: 60s)

12. **Skypiercer Bow** (Bow | CustomModelData: 10012)
    - *Passive:* Zero-G - Arrows fired ignore all gravity scales and fly perfectly straight.
    - *Ability 1:* Sonic Arrow - Fires a high-velocity arrow that creates a sonic boom, breaking glass and disorienting targets. (Configurable cooldown)
    - *Ability 2:* Eagle Eye - Grants the user high-level Zoom capabilities and vision modifications. (Configurable cooldown)
    - *Ability 3:* Celestial Strike - Shoots an arrow straight up; after a configured delay, a beam of light vaporizes the spot it was shot from. (Configurable cooldown, default: 60s)

13. **Earthshaker Mace** (Mace | CustomModelData: 10013)
    - *Passive:* Grounded - The user takes a configured percentage less knockback from all sources while standing on natural terrain blocks.
    - *Ability 1:* Rock Wall - Raises a temporary wall of stone blocks directly out of the earth. (Configurable cooldown)
    - *Ability 2:* Boulder Toss - Launches a stone block projectile forward that explodes on impact, dealing blunt force damage. (Configurable cooldown)
    - *Ability 3:* Seismic Fracture - Triggers a massive earthquake wave that staggers, disarms, and trips all grounded enemies. (Configurable cooldown, default: 60s)

14. **Paladin's Bastion** (Netherite Sword | CustomModelData: 10014)
    - *Passive:* Holy Guard - When falling below a configured health threshold, instantly gain a configured health regeneration effect.
    - *Ability 1:* Light Beam - Fires a beam of holy light that heals friendly targets and burns undead enemies. (Configurable cooldown)
    - *Ability 2:* Aegis Aura - Grants all players within a configured radius Resistance for a configured duration. (Configurable cooldown)
    - *Ability 3:* Sanctuary - Creates a large golden runic zone on the ground; enemies are physically blocked from walking inside it. (Configurable cooldown, default: 60s)

15. **Windrunner Axe** (Netherite Axe | CustomModelData: 10015)
    - *Passive:* Zephyr - Successive melee hits on a target accelerate the user's attack speed by a configured percentage per hit up to a configured maximum.
    - *Ability 1:* Gale Blade - Launches a sharp, flying wind crescent projectile that cuts through multiple targets. (Configurable cooldown)
    - *Ability 2:* Slipstream - Launches the user forward into the air with a massive aerodynamic burst. (Configurable cooldown)
    - *Ability 3:* Cyclone Flight - Grants the player full flight capabilities and speed boosts for a configured duration. (Configurable cooldown, default: 60s)

16. **Sonic Crossbow** (Crossbow | CustomModelData: 10016)
    - *Passive:* Echo Location - Holding this weapon reveals invisible entities within a configured radius as glowing outlines.
    - *Ability 1:* Frequency Blast - Fires a sonic pulse that causes the target's screen to shake violently for a configured duration. (Configurable cooldown)
    - *Ability 2:* Sound Barrier - Emits an acoustic wall that deflects incoming arrows directly back to their shooters. (Configurable cooldown)
    - *Ability 3:* Resonance Rupture - Fires a heavy acoustic charge that detonates, dealing armor-ignoring internal blast damage. (Configurable cooldown, default: 60s)

17. **Dragon Blade** (Netherite Sword | CustomModelData: 10017)
   - *Weapon Stats:* Normal vanilla sword attack speed.
   - *Passive (Dragon Heart):* Total immunity to fire/lava damage; attacks set enemies ablaze with blue fire for a configured duration.
   - *Ability 1 (Shift + Right-Click):* Firebreath Line - Shoots a piercing line of dragon fire particles forward, burning all entities caught in its path. (Configurable cooldown)
   - *Ability 2 (Shift + Left-Click):* Tail Sweep - Performs a rotating spin attack that deals sweeping damage and high horizontal knockback to all surrounding threats. (Configurable cooldown)
   - *Ability 3 (Shift + F):* Dragon Roar - Triggers a massive screen-shaking dragon roar particle field. Launches all nearby enemies a configured number of blocks into the air while dealing heavy area-of-effect explosion damage. (Configurable cooldown, default: 60s)

### 6. The World Crafting Ritual System
When a player crafts any of these 17 weapons, intercept the inventory click event. Do not put the item into their inventory. Instead, consume the ingredients and trigger a world event:
- **Global BossBar Tracker:** Immediately create a global BossBar visible to all players online. The bar must be purple/blue, steadily draining over a configurable duration (default: 30 minutes). The text must dynamically read: `&d&lCrafting Ritual: [Weapon Display Name] at X: [X], Y: [Y], Z: [Z] | Time Left: [MM:SS]`
- **Visual Magic Circle:** At the exact world coordinates of the crafting table block, generate a wide, perfect geometric circle on the ground made out of **SOUL_FIRE / SOUL flame particles** (creating a bright cyan magic ring exactly as shown in reference documentation).
- **The Floating Artifact:** Spawn the crafted weapon item stack as an unpickupable, gravity-defying, rotating item entity suspended exactly 1.5 blocks directly above the center of the particle magic circle.
- **The 30-Minute Lockout Drop:** The item entity must remain locked, floating, and invulnerable in the center of the particle circle for exactly 30 minutes (or the configured duration). During this window, players will fight to secure the location. Once the timer hits 0, delete the bossbar, stop the particle loops, and drop the weapon item stack onto the ground as a normal pickupable item entity for anyone to claim.
Kodari AI
KodariJul 11 at 1:49 pm 18
ArisWeapons
A configurable Minecraft 1.20+ weapon arsenal featuring 17 custom weapons with unique passive and active abilities, dynamic attributes, custom recipes, cooldowns, status effects, admin distribution tools, preview GUIs, and one-time global crafting rituals. Crafting creates a contested world event with a boss bar, soul-fire magic circle, floating protected artifact, configurable lockout timer, and a final public weapon drop.
  • Build a Gradle Java 17 Paper plugin with XSeries compatibility and Lombok-backed configuration models.

  • Implement a config-driven weapon registry, item creation, recipes, custom lore, one-craft locking, and admin commands.

  • Implement event-driven passive effects, three shift-triggered abilities, cooldown tracking, projectile behavior, and preview GUI handling.

  • Implement global crafting rituals with boss bars, particle circles, floating artifacts, timed drops, and player synchronization.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
13 2,231
src/main/java/com/kodari/arisweapons/ArisWeaponsPlugin.java
package com.kodari.arisweapons;

import com.kodari.arisweapons.command.WeaponsCommand;
import com.kodari.arisweapons.listener.WeaponListener;
import com.kodari.arisweapons.ritual.RitualManager;
import com.kodari.arisweapons.weapon.WeaponManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class ArisWeaponsPlugin extends JavaPlugin {
    private WeaponManager weaponManager;
    private RitualManager ritualManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        weaponManager = new WeaponManager(this);
        ritualManager = new RitualManager(this);
        Bukkit.getPluginManager().registerEvents(new WeaponListener(this), this);

        WeaponsCommand weaponsCommand = new WeaponsCommand(this);
        if (getCommand("weapons") != null) {
            getCommand("weapons").setExecutor(weaponsCommand);
            getCommand("weapons").setTabCompleter(weaponsCommand);
        }
    }

    @Override
    public void onDisable() {
        if (ritualManager != null) {
            ritualManager.shutdown();
        }
    }

    public WeaponManager getWeaponManager() {
        return weaponManager;
    }

    public RitualManager getRitualManager() {
        return ritualManager;
    }
}