1.21.11 plugin
📄
jdjd.txt
txt
143 lines
▶
Custom Weapons Implementation Request (Claude-Optimized)
You are developing a Minecraft plugin with custom items and abilities. Implement the following two weapons with clean, modular, and configurable code.
---
## **1. Add Custom Weapons (Balanced OP & Craftable)**
Introduce **two anime-inspired weapons**. They must feel powerful but not overpowered or one-shot.
---
### **A. Split Soul Katana**
**Base Item:**
* Netherite Sword
**Crafting Recipe:**
* Must include a **Dragon Egg** as a core ingredient.
* Use a **shaped recipe** (not shapeless).
* Ensure the recipe is unique and not easily confused with vanilla recipes.
**Abilities / Effects:**
* Attacks partially **bypass armor** (true damage or armor penetration).
* Deal **bonus damage to high-health targets**.
* Include ONE optional passive (configurable):
* Lifesteal (small percentage), OR
* Bonus damage to low-health enemies
**Visual Effects:**
* Dark or purple particles on:
* Swing
* Hit
* Subtle aura effect when held (not excessive).
---
### **B. Inverted Spear of Heaven**
**Base Item:**
* Prefer **Trident** (for uniqueness), but a custom sword is acceptable.
**Crafting Recipe:**
* Must include a **Dragon Egg**.
* Must be **different from the katana recipe**.
**Abilities / Effects:**
* On hit:
* **Cancels or disables abilities**
* Removes:
* Potion effects
* Active ability buffs
* Must be balanced using:
* Chance-based activation OR
* Short cooldown system
**Visual Effects:**
* White / blue / “inverted” style particles
* Sharp, clean effect when ability cancel triggers
---
## **2. Balance Requirements**
* Weapons must feel **strong but fair**.
* No one-shot mechanics.
Implement configurable values in `config.yml`:
* Base damage
* Ability damage modifiers
* Cooldowns
* Effect strength (lifesteal %, cancel chance, etc.)
---
## **3. System Design Requirements**
* Code must be:
* Modular
* Cleanly separated (weapon logic, abilities, config)
* Easy to expand for future weapons
* Ensure compatibility with:
* Existing ability systems
* Combat events
* Avoid:
* Conflicts with other abilities
* Overlapping triggers
---
## **4. Item Identity**
Each weapon must have:
* Custom name
* Lore describing its ability
* Clear in-game identity
**5. admin commands
jjkwp
jjkwp give "item"
jjkwp reload
**6. Expected Outcome**
After implementation:
* Both weapons are fully craftable and functional
* Each has:
* Unique mechanics
* Balanced power
* Clean, noticeable (but not excessive) visual effects
* Systems are configurable and stable
* No conflicts with existing gameplay systems
make sure it makes the the weapons fully configurable from the damage to the cooldown, everything must be configurable
I’ll create a custom weapons plugin with two anime-inspired weapons — Split Soul Katana and Inverted Spear of Heaven.
Plan:
WeaponManager— item creation, recipe registration, PDC-based identificationSplitSoulKatana/InvertedSpearOfHeaven— ability logic + particle effectsWeaponListener— combat/swing event delegationConfigManager— typed config getters for all configurable valuesJJKCommand—/jjkwp give <player> <weapon>+/jjkwp reload
Here’s what was built:
Split Soul Katana (/jjkwp give <player> katana)
Netherite Sword base, crafted with
NETHERITE_INGOT / DRAGON_EGG / NETHERITE_SWORDin a cross patternArmor bypass via
DamageModifier.ARMORreduction (configurable %)High-health bonus damage when target is above the threshold
Configurable passive: either lifesteal or low-health bonus damage
Purple/witch WITCH + DRAGON_BREATH particles on hit, PORTAL on swing, small aura while held (repeating task)
Inverted Spear of Heaven (/jjkwp give <player> spear)
Trident base, crafted with
NETHERITE_INGOT / TRIDENT / DRAGON_EGGin a T-shapeChance-based (configurable) ability cancel strips all active potion effects from the victim
Per-attacker cooldown tracked via
Map<UUID, Long>END_ROD + CLOUD particles on hit; burst of END_ROD + CLOUD on cancel trigger with chat feedback
Admin commands: /jjkwp give <player> <katana|spear> and /jjkwp reload — all values in config.yml are live after reload.
hi this was my first plugin follow this copy it, when i attack it spawned a slash animation on the mob and when life steal activated it put heart particles and actually gave me hearts when said ability activated
Let me read the existing files first.
Now I understand the full codebase. Two targeted changes:
Slash animation — spawn particles in an arc/sweep across the victim’s body on hit
Heart particles + actual healing — already heals, just need to add
HEARTparticles at the player’s location when lifesteal fires
Now remove the duplicate lifesteal block that remained after the patch (the original one was left in place by my search/replace order). Let me verify the file is clean:
The file got corrupted mid-patch — line 55 has a dangling fragment. I’ll do a full update to fix it correctly.
Two things added to SplitSoulKatana:
Slash animation —
spawnSlashArc()places 13 WITCH + PORTAL particles in a parabolic sweep sideways across the victim’s body every hit, simulating a sword slash motionHeart particles on lifesteal —
spawnHeartParticles()fires 6HEARTparticles above the attacker’s head whenever lifesteal actually heals them (health is already being restored bysetHealth()as before)
yo do the same with the spear add more effects/animations and also please can you add the proper lore like what i gave in the photo..... this is the original prompt i gave to the first ai follow this one instead because i think its much better also add more particles but not too many
📄
claude_prompt.txt
txt
76 lines
▶
1. Add Custom Weapons (Craftable, Balanced OP)
Introduce two custom weapons inspired by anime. These weapons should be powerful but not game-breaking.
A. Split Soul Katana
Base Item:
- Netherite Sword
Crafting:
- Must include a Dragon Egg as a core ingredient.
- Create a unique recipe (not shapeless, clearly defined pattern).
Abilities / Effects:
- Attacks partially bypass armor (true damage or armor penetration mechanic).
- Bonus damage against high-health targets.
- Optional passive:
- Slight lifesteal OR
- Extra damage on low-health enemies
Visuals:
- Dark or purple particle effects when swinging or hitting.
- Subtle aura when held.
B. Inverted Spear of Heaven
Base Item:
- You may choose:
- Trident (preferred for uniqueness), OR
- Custom-modeled sword
Crafting:
- Must include a Dragon Egg
- Use a different recipe from the katana.
Abilities / Effects:
- Cancels or disables abilities on hit (anti-ability mechanic).
- Removes or negates:
- Potion effects
- Active ability buffs
- Chance-based effect OR short cooldown to keep it balanced.
Visuals:
- White/blue or inverted-style particles.
- Clean, sharp effect when ability cancel triggers.
3. Balance Requirements
- Weapons should feel strong but fair, not one-shot tools.
- Add:
- Cooldowns for special effects
- Configurable values in config.yml:
- Damage
- Cooldowns
- Effect strength
- Ensure compatibility with existing ability system.
4. General Expectations
- Weapons must:
- Be fully craftable
- Have clear in-game identity (name, lore, effects)
- Code should be:
- Modular
- Expandable for future weapons
- Avoid conflicts with existing combat or ability triggers.
5. Expected Outcome
After implementation:
- Two unique, anime-inspired weapons exist with:
- Distinct abilities
- Balanced mechanics
- Strong visual feedback but not too much just right
- Crafting system works cleanly and intuitively.
Let me read the files I need to modify.
Now I have everything I need. I’ll update the spear with a stab/thrust animation, a cancel burst ring, an impact effect, and proper lore. I’ll also update both items’ lore to match the original prompt’s flavor.
Now I have everything. Here’s my plan:
Spear: Add stab/thrust line animation toward victim, impact burst on hit, cancel ring burst around victim, swing particles, proper lore
Katana: Update lore to match original prompt flavor
WeaponListener: Add spear swing handler
ConfigManager + config.yml: Add
spear.hit_particlesfield
Here’s everything that changed for the Inverted Spear of Heaven:
Animations & Effects:
Swing — forward arc sweep of
END_RODparticles fanning out in front of the player + configurable swing particlesThrust line — on hit, a line of
END_ROD+CLOUDwisps traces from the attacker’s eye to the victim, selling the spear-thrust motionImpact burst — sharp cluster of
END_ROD+CLOUD+ configurable hit particles at the victim’s chestCancel burst — two concentric horizontal rings of
END_RODaround the victim + a verticalCLOUDcolumn shooting upward, plus the configurable cancel particles flooding the area — only triggers when the ability cancel procs
Lore — both weapons now have formatted lore panels with §8▬ dividers, colored ability headers (§d⚔, §b⚡, §d♥), and description lines matching the original prompt’s flavor exactly.
naming is kinda broken because when seen in inv iy shows two names example; woodensword woodensword and also please add an ability to the spear where i you shift hit or shift leftclick with it it stun the enemy for 3 second, configurable in the files and the blade make the animations better maybe add a dash ability when you shift left click with it, cooldown for abilities for the spear should be 60 seconds and sword has 40 fully configurable also makle it polished fix the lore so itll feel like a lwegendary weapon add crafting recepies for it too, add a command called /jjkwp recepies and the wepon recepie
Let me read all the files first.
Now I have everything. Here’s my plan:
Double name bug — lore arrays open with the weapon name as first entry, duplicating the display name; remove those lines and fully rewrite lore to feel legendary
Spear stun — shift + hit on entity triggers 3s stun (slowness 255 + mining fatigue), with its own cooldown separate from ability cancel
Katana dash — shift + left swing launches player forward, 40s cooldown
Cooldowns — change config to seconds (60s spear, 40s katana), user-friendly
/jjkwp recipes— shows both crafting grids formatted in chat with ingredient keyBetter animations — improved slash arc (dual-sweep), spear impact (expanding cone + ring pulse), stun visual (downward spiral)
Now fix the missing XSound import in SplitSoulKatana (I used it for the dash but forgot to import it):
Here’s a summary of every change:
Double name fix — removed the weapon name as the first lore line from both items; it was showing the display name AND a duplicate lore line
Lore overhaul — both weapons now have bordered lore panels with §8▬ dividers, labeled PASSIVE ABILITIES / ACTIVE ABILITY sections with inline cooldown values pulled live from config, and flavor text that makes them feel like legendaries
Katana — Cursed Dash (Sneak + Swing) — launches the player forward with configurable speed, leaves a PORTAL + WITCH particle trail behind them, plays an enderman teleport sound, 40s cooldown (configurable via katana.dash_cooldown_seconds)
Spear — Heaven’s Judgement (Sneak + Hit) — applies Slowness 255 + Weakness 255 + Mining Fatigue 255 for 3s (all configurable), triggers a descending helix particle vortex + ground shockwave ring, plays wither shoot sound, 60s cooldown separate from the cancel ability
/jjkwp recipes — displays both crafting grids in chat as ASCII tables with a color-coded ingredient key
Config — all cooldowns now in human-readable seconds, new stun_duration_seconds, stun_cooldown_seconds, dash_cooldown_seconds, dash_speed, stun_particles keys added
📄
pasted-code-1776961173276.txt
txt
88 lines
▶
In Jujutsu Kaisen, the term **“Dragon Bone”** (often associated with Maki Zenin’s weapon) refers to a **special-grade cursed tool** with a very specific and dangerous mechanic.
Here’s a clear, detailed breakdown you can pass along:
---
## 🐉 What “Dragon Bone” actually is
**Dragon Bone** is a **cursed tool designed to store and release energy**. Unlike normal weapons that simply channel cursed energy, this one **accumulates impact force and cursed energy over time** and then **returns it explosively**.
Think of it less like a sword and more like a **kinetic feedback weapon**.
---
## ⚙️ Core Mechanism
When the weapon makes contact (blocking, striking, clashing):
1. **It absorbs kinetic force** (physical impact)
2. **It stores cursed energy** (either from the user or opponent)
3. The stored energy **builds internally**
4. It then **releases that stored power in a reinforced strike**
So instead of just hitting once, every clash is basically **charging the next hit**.
---
## 🔁 Why it’s dangerous
* The longer a fight goes on, the stronger the weapon becomes
* It can **turn defense into offense** instantly
* Even blocking attacks contributes to its power buildup
This makes it especially lethal in prolonged combat.
---
## 👤 Why Maki can use it effectively
A key reason Dragon Bone works so well with **Maki Zenin**:
* She has **zero cursed energy**
* Her body is physically enhanced (Heavenly Restriction)
* She relies purely on **physical combat and tools**
Because of this:
* She doesn’t interfere with the weapon’s energy flow
* She can fully exploit its **stored kinetic amplification**
* Her fighting style naturally feeds the weapon’s mechanic
---
## 🧠 Conceptual analogy
A simple way to understand it:
> Dragon Bone is like a **spring-loaded hammer** that tightens every time it’s hit—until it snaps forward with massive force.
---
## 🖱️ “Shift + Left Click” Ability (for Claude prompt use)
You can append this as a system-style mechanic:
**Ability Name:** Energy Overdrive (Shift + Left Click)
**Effect:**
* Instantly releases all stored kinetic and cursed energy in Dragon Bone
* Produces a **high-impact, short-range shockwave strike**
* Damage scales based on accumulated energy
**Trade-offs:**
* Empties all stored energy
* Temporarily disables energy accumulation (cooldown phase)
* Causes recoil strain on the user’s body
**Optional flavor:**
* Visual: cracks of energy forming along the blade before discharge
* Sound: deep pressure “snap” like something compressed releasing
---
If you want, I can turn this into a cleaner “ability card” or RPG-style stat block for Claude.
Compilation failed with 2 error(s):
ERROR in src/main/java/com/jjkweapons/WeaponManager.java at line 26: cannot find symbol @Getter private final DragonBone dragonBone; ^ symbol: class DragonBone location: class WeaponManager
ERROR in src/main/java/com/jjkweapons/WeaponManager.java at line 26: cannot find symbol @Getter private final DragonBone dragonBone; ^ symbol: class DragonBone location: class WeaponManager
=== COMPILATION ERROR ANALYSIS ===
MISSING CLASSES: - DragonBone ACTION: Create these classes or check imports
FILES TO INVESTIGATE: - src/main/java/com/jjkweapons/WeaponManager.java
DragonBone class is referenced in WeaponManager but never created. I’ll make it follow the exact same pattern as the other two weapons.
Created DragonBone.java as a crafting component item following the same constructor signature (JJKWeapons, NamespacedKey) that WeaponManager expects.
Hidden Extension Mechanic When the player right-clicks, the chain shoots forward much farther than visually expected (like a grappling or extending attack).
Range should be configurable (e.g., up to 20–30 blocks).
Binding Ability If the chain hits a player or mob, it “binds” them for a few seconds.
Bound targets are slowed heavily or completely immobilized.
Pull Mechanic After hitting a target, the user can pull the enemy toward them OR pull themselves toward the target.
Cooldowns Each ability should have cooldowns to prevent spam.
Show cooldown feedback via action bar or chat.
Visual Effects Use particles or a line effect to represent the chain extending.
Make it look fast and slightly unexpected.
Balance Features Limited durability or energy system Cannot bind bosses or very strong mobs for full duration Configuration File Allow changing range, cooldowns, bind duration, and effects Code Structure Clean, modular Java code Separate classes for abilities, listeners, and config handling
[Generation stopped]
hi can you please fix the particles from the weapons? its too excessive yes i wanted slash effects but only on the target it shouldnt put slash particles when hitiing the air and also please make the split katanas lore not include the from cursed craft and also the slash effects i was talking about was like what the sweep hit from the player has put that on the mob when hitting and and some particles make the lifesteal particle also feel more real and the damage when the lifesteal acctivates should be the amount of healthg given back so if the player deals 15 damage when the lifesteal activastes it should heal 15 hearts back lifesteal aqmmount should be shown in xhat example damage is 15 lifetsteal is 15 but the lifwe steral should be balanced and for the spear add loyalty so itll comeback make all the weapons unbreakable too
Here’s my plan:
Remove air-swing slash arcs from all three
handleSwingmethods; addSWEEP_ATTACKparticle on victim inhandleHitRemove the “cursed craft” lore line from katana; set all weapons unbreakable
Fix lifesteal to heal
finalDamage * percentage(default 1.0 = 1:1), show amount in action barMake heart particles visually impactful on lifesteal
Add Loyalty III to the spear via
XEnchantment
Now I have everything. Writing all patches:
Now updating ConfigManager default to match:
Here’s a summary of every change made:
All weapons —
meta.setUnbreakable(true)added increateItem()Katana lore — removed
"§5§oA legendary weapon of cursed craft."lineSlash particles on air —
handleSwingnow does nothing (or only handles dash for katana); slash arcs only fire inhandleHitwhen a target is actually struckSweep effect on hit —
Particle.SWEEP_ATTACKis spawned at the victim’s position on every katana hit, mirroring the vanilla sweep lookLifesteal is now 1:1 — heals
finalDamage × lifestealPercentage(default1.0), so 15 damage → 15 hearts healed; admin can tune the percentage in configLifesteal feedback — action bar shows
⚔ Damage: 15 ♥ Lifesteal: +15; heart particle count now scales with heal amount +INSTANT_EFFECTflash for realismSpear —
XEnchantment.matchXEnchantment("LOYALTY")applies Loyalty III so thrown tridents return
hi great start but the aoe on the dragon bone doesnt work for some reason i need to hit the entity directly it should activate even if theres no entity is hit hitting the air hsould be enough and also please make the dragon bones aoe do knockback
The problem is clear: Overdrive is inside handleHit which only fires when an entity is actually hit. Swinging at air never triggers EntityDamageByEntityEvent, so Overdrive never activates. The fix is to move Overdrive into handleSwing (which fires on every arm swing) and center the AoE on the player. I’ll also add knockback to all hit entities.
Overdrive moved to
handleSwing— fires on every arm swing while sneaking, so hitting air worksAoE centered on the player instead of a victim;
getNearbyEntitieson the player scans the full radius around themKnockback added — each entity in the AoE is launched away from the player with a normalized direction vector
follow this png the katana, revert the life steal to how it was but follow what the png says
From the PNG, the lore needs to be completely restyled — clean gold passives, simple description, “Soul Slash” Right-Click ability, and lifesteal reverted to crit-only with no action bar spam.
Now update the config default for lifesteal percentage back to something balanced (0.15 = 15%) since 1.0 was the broken “1:1 hearts” change:
Now I have everything. Making the changes:
Lore now matches the PNG — clean gray description, gold
Passive:andRight-Click Ability:sections with bullet points, no decorative dividersLifesteal reverted to crit-only (
fallDistance > 0) with no action bar message, and percentage reset to a balanced0.15(15% of damage healed)
keep the old lore revert it i dont like the new lore but like the cursed slash that was what im talking abount remove the cursed slash from the lore only keep the dash there but keep the particles from the cursed slash and instead of anormal dash.. make it when you dash you deal dasmage to an opponent just like the minecraft spear also rename it to slashing dash and one thing make the aoe from the bone blade do more damage show the ammount of damage done by the aoe in chat plus the amount of damage turned to lifesteal hearts when critted using the katana, change the crafting recepie for all the weapons too make it hard to get but obtainable too dont use the dragon egg but make it hard to craft regardless
Here’s my plan:
Revert katana lore to divider-style format, remove Cursed Slash from lore, rename dash to Slashing Dash which damages nearby entities in the dash direction on activation
Keep slash arc particles firing on hit (as-is)
Show lifesteal healed amount in chat on crit
Show AoE damage per entity + total in chat for Dragon Bone Overdrive, bump overdrive damage
Replace all dragon egg recipes with hard but grindable ingredients (Wither Skeleton Skulls, Blaze Rods, Ancient Debris, etc.)
Now add the Entity import to the katana file since we use it in the dash:
Now Dragon Bone — more overdrive damage + show per-entity and total damage in chat:
Now update the crafting recipes — replace dragon egg with hard grindable ingredients:
Also bump overdrive base damage in config since we removed the stack cap bonus scaling:
Here’s a summary of every change:
Katana lore — back to the divider
▬style matching Dragon Bone / Spear format; only the dash ability is listed, renamed to Slashing DashSlashing Dash — now damages entities in your forward arc on activation (1.5× base damage + knockback + slash arc particles), messages say “Slashing Dash” everywhere
Lifesteal chat — on crit, prints
⚔ Damage: X | Lifesteal: +X ♥in chatOverdrive AoE — knockback bumped (2.2 / 0.55), damage increased to 14 base / 3.5 per stack; prints one message per entity hit showing damage, then a summary with total targets and total damage
Crafting recipes — all dragon eggs removed; Katana needs Wither Skeleton Skull + Netherite + Blaze Rod + Netherite Sword; Spear needs Trident + Netherite + Heart of the Sea + Nautilus Shell; Dragon Bone needs Wither Skeleton Skull + Ancient Debris + Bone Block
add a new weapon the , chain of a thousand miles Hidden Extension Mechanic When the player right-clicks, the chain shoots forward much farther than visually expected (like a grappling or extending attack).
Range should be configurable (e.g., up to 20–30 blocks).
Binding Ability If the chain hits a player or mob, it “binds” them for a few seconds.
Bound targets are slowed heavily or completely immobilized.
Pull Mechanic After hitting a target, the user can pull the enemy toward them OR pull themselves toward the target.
Cooldowns Each ability should have cooldowns to prevent spam.
Show cooldown feedback via action bar or chat.
Visual Effects Use particles or a line effect to represent the chain extending.
Make it look fast and slightly unexpected.
Balance Features Limited durability or energy system Cannot bind bosses or very strong mobs for full duration Configuration File Allow changing range, cooldowns, bind duration, and effects Code Structure Clean, modular Java code Separate classes for abilities, listeners, and config handling
Now I have the full picture. Here’s my plan:
Create
ChainOfThousandMiles.javawith shoot, bind, and pull mechanics usingPlayerInteractEventAdd chain config fields to
ConfigManager.javaRegister the chain in
WeaponManager.java(ID, instance, isChain, giveWeapon, recipe)Add right-click handling in
WeaponListener.javaAdd config section to
config.ymland command alias toplugin.yml
Here’s what was added and how everything fits together:
Chain of a Thousand Miles — full ability breakdown:
State | Input | Effect |
|---|---|---|
No active bind | Right-Click | Shoots chain forward, animating particle by particle up to the configured range |
Chain hits entity | — | Target gets Slowness VII (immobilized) for bind_duration_seconds; bosses only get boss_bind_duration_seconds |
Bind active | Right-Click | Pulls the enemy toward you with velocity; bind released |
Bind active | Sneak + Right-Click | Pulls yourself toward the target; bind released |
Chain hits a wall | — | Chain stops early with feedback |
Any cooldown active | Right-Click | Action bar shows remaining seconds |
Recipe: Chain (center top) + 2× Ender Pearl (sides) + Netherite Ingot (center) + Heart of the Sea (bottom) — requires Enderman, Nether, and ocean monument progression to craft.
uh add the chain recepie and give command it seems i cant get it
Two issues: the tab completer doesn’t list chain, and the sendRecipes/help text don’t mention it either. The recipe registration and giveWeapon already handle chain correctly — just the command UI is outdated.
Now add the chain recipe display to sendRecipes:
chainadded to tab complete so/jjkwp give <player> chainautocompletesHelp usage updated to list all four weapons
Chain recipe grid added to
/jjkwp recipesoutput
hi last thing the chains abilities doesnt work i think its because its set for right click on the second ability too maybe try setting one of the ability to shift left click and dthe other is double sift make the particles from the spear when hitting lesser and add the current spear particle to when it shoots so lesser particles when hitting more particles when throwing and when it hits a target make it a dramatic explosuion of particles but not too much
Now I have the full picture. Plan:
Chain: right-click = shoot, shift + right-click = pull enemy to you, shift + left-click (swing) = pull yourself to target — three distinct inputs, no collision
Update chain lore to match new controls
Spear hit (melee): reduce particles significantly
Spear throw (launch): spawn dense particle trail
Spear throw impact: dramatic burst when the trident hits its target — listen for
ProjectileHitEvent+EntityDamageByEntityEventwithThrownTridentdamager
Now fix the listener to route the three distinct inputs correctly and add spear throw events:
Now update the spear — fewer hit particles, trail method for throw, dramatic thrown impact:
Three things are fixed:
Chain abilities — completely separated: Right-Click shoots, Shift + Right-Click pulls the enemy toward you, Shift + Left-Click (swing) launches yourself toward the bound target. Lore updated to match. No ability can ever conflict with another.
Spear melee particles — trimmed down significantly: thrust line uses only 8 sparse
END_RODdots, melee impact is just 4 rods + 2 cloud puffsSpear throw —
ProjectileLaunchEventstarts a per-tick helix trail on the trident; when the thrown trident hits a living entity (EntityDamageByEntityEventwithTridentdamager),spawnThrownImpactfires a large three-ring ground explosion, four diagonal column bursts, and a lightning crack sound — dramatic but not excessive
when i try to attach the chain to the mobs it doesnt seems to attach fix it i think its not attaching because its just particles but i really wqant the particles to act as a projectile so maybe when shooting the chain it shoots a snow ball with no gravity so it'll not have a curve path and detect when the snow ball hit equals to the attached state or the state where the entity is binded to the chain
package com.jjkweapons;
import com.jjkweapons.commands.JJKCommand;
import com.jjkweapons.listeners.WeaponListener;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
public class JJKWeapons extends JavaPlugin {
@Getter private static JJKWeapons instance;
@Getter private ConfigManager configManager;
@Getter private WeaponManager weaponManager;
private BukkitTask auraTask;
@Override
public void onEnable() {
instance = this;
saveDefaultConfig();
configManager = new ConfigManager(this);
weaponManager = new WeaponManager(this);
weaponManager.registerRecipes();
Bukkit.getPluginManager().registerEvents(new WeaponListener(this), this);
getCommand("jjkwp").setExecutor(new JJKCommand(this));
startAuraTask();
getLogger().info("JJKWeapons enabled.");
}
@Override
public void onDisable() {
if (auraTask != null) auraTask.cancel();
getLogger().info("JJKWeapons disabled.");
}
public void reload() {
reloadConfig();
configManager.reload();
if (auraTask != null) auraTask.cancel();
startAuraTask();
}
private void startAuraTask() {
int interval = configManager.getAuraInterval();
auraTask = Bukkit.getScheduler().runTaskTimer(this, () -> {
for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
if (weaponManager.isKatana(player.getInventory().getItemInMainHand())) {
weaponManager.getKatana().spawnAura(player, configManager);
}
}
}, interval, interval);
}
}