I want to make fully working plugin using the anvil we can add a sword with a mace the first weapon in the slot is the look and still have same thing the seacond slot have will get is ability also make that there is infinite fusion with weapon the first weapon keep look and its own attack and use and also gain the seacond slot use
Creating the plugin files now.
Ready. 9 files created:
File | Purpose |
|---|---|
plugin.yml | Plugin metadata, /weaponfusion command, permissions |
config.yml | Per-ability effect tunables |
WeaponAbility.java | 12 abilities with unique effects (XPotion for cross-version safety) |
AbilityManager.java | PDC storage, material→ability mapping, fusion logic, lore updates |
FusionGUI.java | 27-slot anvil-themed GUI, auto-updating result slot, item return on close |
AttackListener.java | Triggers all fused abilities on melee hit |
FusionCommand.java | /weaponfusion/wf/fuse command |
WeaponFusionPlugin.java | Main class — registers listeners + command |
build.gradle | Paper API dependency |
How it works:
/weaponfusionopens the fusion GUI (3 functional slots: primary left, secondary right, result bottom)Place any weapon in the left slot — it keeps its material, name, enchantments, stats, everything
Place any weapon in the right slot — its innate ability (e.g. MACE→Knockback, SWORD→Flame) is extracted
The result slot auto-updates showing the fused weapon with the new ability added to its lore
Click the result to claim it — both input items consumed
Infinite fusion — fuse a fused weapon with another weapon to stack abilities (all previous abilities carry forward)
Attacking mobs/players triggers every fused ability simultaneously (lightning strike + poison + knockback + heal, etc.)
Material→Ability mapping: MACE→Knockback, NETHERITE_SWORD→Wither, DIAMOND_SWORD→Flame, BOW→Poison, CROSSBOW→Explosive, TRIDENT→Lightning, axes→Slow/Blindness/Vampiric/Levitation, various swords→Weakness/Hunger/Poison.
also make that I can add riptide and channel in a Trident and make that channel don't need to be raining and make that riptide still need to be raining to be use make that we can use it and make that there is no bug it work and make
Now I’ll add the Riptide and Channel abilities, make Channel always work (no rain check), make Riptide require rain/water to activate, and wire everything up
Now I need to: update AbilityManager so a trident gives both Channel + Riptide abilities, create the Riptide activation listener, and register it
Now I’ll create the RiptideListener — handles right-click activation of Riptide (only in water/rain) and register it.
Infinite Fusion System
FusionForge supports unlimited item fusion.
There is no maximum number of fusions.
Example:
Diamond Sword + Mace
↓
Fusion Sword
↓
Fusion Sword + Mace
↓
Fusion Sword + Mace
↓
Fusion Sword + Mace
↓
Continue forever.
A player can fuse the same weapon 100 times, 500 times, or even 1,000 times if the server owner allows it.
---
Ability Stacking
Server owners can choose how repeated fusions behave.
Option 1 - Refresh (Recommended)
If the item already has an ability from the same weapon, fusing it again refreshes or upgrades that ability instead of creating duplicates.
Example:
Diamond Sword + Mace
→ Gains Smash I
Fuse another Mace
→ Upgrades to Smash II
Fuse another Mace
→ Upgrades to Smash III
This prevents duplicate abilities while rewarding repeated fusions.
---
Option 2 - Stack
Each fusion increases the ability's power.
Example:
Mace Smash
1 Fusion = +10% Smash Damage
10 Fusions = +100% Smash Damage
50 Fusions = +500% Smash Damage
The multiplier should be configurable in the plugin config.
---
Fusion Counter
Every fused item stores:
* Total fusion count * Fusion history * Ability levels
Example Lore:
Fusion Count: 127
Abilities: • Smash V • Loyalty III • Multishot II • Riptide I
Fusion History:
Diamond Sword
* Mace × 75 * Trident × 20 * Bow × 12 * Crossbow × 20
---
Configuration
config.yml
allow-infinite-fusion: true
max-fusions: -1
(-1 means unlimited.)
ability-stacking: true
stack-same-item: true
upgrade-existing-abilities: true
show-fusion-count: true
---
Safety
Even with unlimited fusion:
* No item duplication. * No NBT corruption. * No metadata loss. * No crashes. * No integer overflow from extremely high fusion counts. * Fusion data must save correctly across server restarts. * The plugin must remain optimized even if an item has hundreds of fusions.
I’ll refactor the entire plugin to use the GUI framework and implement the full infinite fusion system with ability stacking, fusion counter, and all config options. First, let me re-read the current state.
Now I’ll do a complete rewrite with all requested features. I need to create the GUI framework, overhaul ability storage with levels, add fusion counter/history, and handle riptide properly.
Now the core files — complete rewrites:
Done. Here’s what changed:
Infinite Fusion: Every fusion increments a fusion_count PDC int. Config option max-fusions: -1 means unlimited. Setting it to 100 caps at 100 fusions. The GUI prevents claiming if the cap is hit.
Ability Levels: Abilities now store ABILITY:level in PDC. Effects scale with level:
Flame — fire ticks increase per level
Poison — amplifier and duration increase
Explosive — blast radius grows
Vampiric — heal amount per level
Riptide — launch power scales
All others follow same pattern with duration/amplifier/effect scaling
Ability Stacking: With upgrade-existing-abilities: true, fusing a weapon that gives an ability you already have increases its level (e.g. Mace → Smash I, another Mace → Smash II). With ability-stacking: true, levels stack additively when fusing fused weapons.
Fusion Counter: Config option show-fusion-count: true adds Fusion Count: 127 to the lore. Roman numeral levels (I, II, III, IV, V, X, etc.) keep lore clean.
Riptide: Right-click activates in water or rain (checks world storm + exposure to sky). Levels increase launch power. 1-second cooldown to prevent spam.
Channel: Always works regardless of weather. Strikes real lightning (not effect-only) on melee hit.
Fusion GUI: Refactored to use the InventoryGUI framework with GUIManager + GUIListener for cleaner event handling. Items return to inventory on close.
The compilation failed with this error:
Compilation failed with 1 error(s):
ERROR in src/main/java/com/weaponfusion/RiptideListener.java at line 70: class, interface, enum, or record expected
</check>
^
=== COMPILATION ERROR ANALYSIS ===
SYNTAX ERRORS:
- Line 70: class, interface, enum, or record expected
ACTION: Check for missing semicolons or brackets
FILES TO INVESTIGATE:
- src/main/java/com/weaponfusion/RiptideListener.java
Please fix this error by creating a new artifact with the corrected code.
<kodariReadFile>src/main/java/com/weaponfusion/RiptideListener.java
The compilation failed with this error:
Compilation failed with 1 error(s):
ERROR in src/main/java/com/weaponfusion/RiptideListener.java at line 70: class, interface, enum, or record expected
</check>
^
=== COMPILATION ERROR ANALYSIS ===
SYNTAX ERRORS:
- Line 70: class, interface, enum, or record expected
ACTION: Check for missing semicolons or brackets
FILES TO INVESTIGATE:
- src/main/java/com/weaponfusion/RiptideListener.java
Please fix this error by creating a new artifact with the corrected code.
The file looks syntactically correct at lines 1-69. The </check> on line 70 is just tool output formatting, not in the file. The error might be in another file. Let me check the files I rewrote.
The file contains </check> at line 70 — that’s a tool artifact that got embedded. I’ll recreate the file cleanly.
package com.weaponfusion;
import com.weaponfusion.inventory.gui.GUIListener;
import com.weaponfusion.inventory.gui.GUIManager;
import org.bukkit.plugin.java.JavaPlugin;
public class WeaponFusionPlugin extends JavaPlugin {
private AbilityManager abilityManager;
private GUIManager guiManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.abilityManager = new AbilityManager(this);
this.guiManager = new GUIManager();
getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
getServer().getPluginManager().registerEvents(new AttackListener(abilityManager), this);
getServer().getPluginManager().registerEvents(new RiptideListener(abilityManager), this);
FusionCommand cmd = new FusionCommand(this, guiManager, abilityManager);
getCommand("weaponfusion").setExecutor(cmd);
getLogger().info("WeaponFusion enabled! Infinite fusion with ability stacking ready.");
}
@Override
public void onDisable() {
getLogger().info("WeaponFusion disabled!");
}
public AbilityManager getAbilityManager() {
return abilityManager;
}
public GUIManager getGuiManager() {
return guiManager;
}
}