Create a complete, production-ready Minecraft Java Edition plugin called:
CustomWeaponSystem
TARGET:
- Minecraft Java Edition
- Paper 1.21.11
- Java 21
- Multiplayer compatible
- No external dependencies
- Use Paper API only
- Provide complete source code
- Provide plugin.yml
- Provide config.yml if needed
- Code must compile without errors
================================================== COMMAND SYSTEM ==================================================
Create the command:
/givecoustomewepon <weapon>
Examples:
/givecoustomewepon ShadowSwordDual /givecoustomewepon Chlorospyre /givecoustomewepon CrimsonFury
Also support:
/givecoustomewepon all
The "all" option gives the player every custom weapon.
IMPORTANT:
- Only OP players can use /givecoustomewepon.
- Non-OP players must receive a red "You do not have permission!" message.
- Add permission:
customweapon.admin
- OP players automatically have permission.
- Prevent normal players from obtaining custom weapons through this command.
- Tab completion must show all weapon names.
- Weapon names should be case-insensitive.
- Unknown weapon names should show a helpful error message.
- Do not allow players to give themselves weapons using any other command.
- Custom weapons must remain functional after dropping, picking up, storing in chests, restarting the server, etc.
================================================== CUSTOM WEAPON IDENTIFICATION ==================================================
Every custom weapon must have a unique PersistentDataContainer ID.
DO NOT identify weapons only by their display name.
Each weapon should have:
- Unique PDC ID
- Custom display name
- Custom lore
- Custom attributes
- Custom abilities
- Custom cooldowns
Players must not be able to activate abilities using ordinary vanilla swords.
================================================== WEAPON 1 — SHADOW SWORD DUAL ==================================================
Name:
Shadow Sword Dual
Base item:
- Netherite Sword
Display name:
- Dark/black theme with glowing gold text
- Name should clearly say "Shadow Sword Dual"
This weapon is based on the uploaded reference image.
VISUAL STYLE:
- Two-blade / dual-sword fantasy design
- Dark black/obsidian appearance
- Bright golden-white glowing outline
- Elegant but dangerous appearance
- Shadow-themed
- Use Minecraft particles to give it a magical appearance when abilities activate
IMPORTANT:
Because vanilla Minecraft cannot visually display two independent swords as one inventory item, represent it as ONE custom Netherite Sword item while using particles/effects to create the dual-sword visual theme.
================================================== SHADOW SWORD DUAL — ABILITIES ==================================================
ABILITY 1 — CRITICAL STRIKE
The Shadow Sword Dual should have enhanced critical-hit behavior.
Requirements:
- Normal melee attacks work normally.
- Critical attacks should deal additional damage.
- Jump critical hits should have a stronger damage multiplier.
- Play a small critical particle effect when a critical hit occurs.
- Play a custom sound when the enhanced critical hit activates.
Do not make the damage so high that it instantly kills every player regardless of armor.
==================================================
ABILITY 2 — HARD DAMAGE ==================================================
Shadow Sword Dual should have high melee damage.
Suggested:
- Base attack damage: 10 hearts worth of Minecraft damage or an appropriate balanced value.
- Critical attacks receive additional bonus damage.
- Damage must correctly interact with armor and Protection.
- Do not bypass Minecraft's normal damage system unless explicitly required.
Make the weapon feel powerful without causing server-breaking damage.
================================================== ABILITY 3 — INFINITE STRENGTH I ==================================================
While the player is HOLDING Shadow Sword Dual in their main hand:
- Give Strength I continuously.
- Strength must remain active indefinitely while holding the sword.
- When the player stops holding the sword, remove the Strength effect granted by this weapon.
- Do not remove Strength effects that came from another legitimate source.
IMPORTANT:
The plugin must track the Strength effect created by Shadow Sword Dual separately.
Example:
Player holds Shadow Sword Dual → Strength I active
Player switches to another item → Shadow Sword Dual Strength disappears
Player holds Shadow Sword Dual again → Strength I returns
The effect must NOT permanently remain after switching items.
================================================== ABILITY 4 — SHADOW LIGHTNING ==================================================
Activation:
SHIFT + RIGHT CLICK
When the player sneaks and right-clicks while holding Shadow Sword Dual:
- Find the block/entity location the player is targeting.
- Summon a lightning strike at the target location.
- Create dark/gold magical particles around the lightning.
- Play a powerful lightning/shadow sound.
- Deal damage to nearby enemies.
- Do not damage the user.
- Do not repeatedly trigger from one click.
Cooldown:
20 seconds
During cooldown:
- Do not activate the ability.
- Tell the player:
"Shadow Lightning is on cooldown: Xs"
Show the cooldown using seconds with one decimal place where appropriate.
Cooldown must be tracked per player, not globally.
Example:
Player A uses Shadow Lightning → Player A has 20 second cooldown
Player B can still use Shadow Lightning immediately.
================================================== LIGHTNING SAFETY ==================================================
The custom lightning ability must NOT cause unwanted fire/grief.
Do not permanently set blocks on fire.
Do not destroy terrain.
Do not create unnecessary server lag.
If possible, use a visual lightning effect while preventing normal environmental lightning damage/fire behavior.
================================================== WEAPON 2 — CHLOROSPYRE ==================================================
Name:
Chlorospyre
Ability:
Photosynthesis Bloom
Activation:
SHIFT + RIGHT CLICK
Effect:
- Creates a 5-block radius nature particle ring.
- Restores 3 hearts to the wielder.
- Grants Speed I for 6 seconds.
- Effect applies while inside the ring.
- Costs 10 durability.
- Cooldown: 20 seconds.
================================================== WEAPON 3 — CRIMSON FURY ==================================================
Ability:
Bloodlust Strike
Activation:
Passive
Mechanic:
- Every melee hit adds 1 Rage stack.
- Maximum 5 stacks.
- Display Rage stacks in action bar.
- At 5 stacks, the next melee attack becomes empowered.
- Empowered attack deals 150% critical damage.
- Heal the player for 20% of damage dealt.
- Reset Rage after empowered attack.
================================================== WEAPON 4 — TERRAN SUNDERER ==================================================
Ability:
Seismic Shockwave
Activation:
RIGHT CLICK while airborne
Effect:
- Slam player toward the ground.
- On landing create shockwave.
- Knock nearby enemies backward.
- Deal 6 damage.
- Apply Slowness II for 4 seconds.
- Cooldown: 15 seconds.
================================================== WEAPON 5 — GILDED HALBERDIER ==================================================
Ability:
Piercing Lance
Activation:
SHIFT + LEFT CLICK
Effect:
- Perform a long-range melee thrust.
- Maximum effective range: 6 blocks.
- Normal range remains approximately 3 blocks.
- Ignore shield blocking for the special attack.
- Deal 8 bonus armor-piercing damage.
- Cooldown: 8 seconds.
================================================== WEAPON 6 — ARGENT LANCE ==================================================
Ability:
Radiant Pierce
Activation:
RIGHT CLICK
Effect:
- Fire a narrow beam of light.
- Maximum range: 12 blocks.
- Enemies hit take 7 damage.
- Apply fire for 3 seconds.
- Deal 2x damage against undead mobs.
- Cooldown: 10 seconds.
================================================== WEAPON 7 — VERDANT CLEAVER ==================================================
Ability:
Noxious Reap
Activation:
Normal sweep attack
Effect:
- Replace normal sweep visual with a toxic wave.
- Enemies hit receive Poison II for 5 seconds.
- Add appropriate poison particles.
- Armor durability damage may be increased, but do not create excessive server load.
================================================== WEAPON 8 — BLACKENED STEEL ==================================================
Ability:
Umbral Parry
Activation:
HOLD RIGHT CLICK
Effect:
- Enter blocking/parry state for 1.5 seconds.
- Reduce incoming physical damage by 80%.
- If attacked during successful parry:
- Trigger counter effect. - Blind attacker for 3 seconds.
- Cooldown: 12 seconds.
================================================== WEAPON 9 — GOLD-VEINED SABRE ==================================================
Ability:
Gilded Reflect
Activation:
RIGHT CLICK at enemy
Effect:
- Detect targeted living enemy.
- Select one beneficial potion effect from the target.
- Remove/transfer that effect where appropriate.
- Give it to the player for 6 seconds.
- Cooldown: 25 seconds.
Do not steal permanent/custom effects that are not normal potion effects.
================================================== WEAPON 10 — RUNIC BROADSWORD ==================================================
Ability:
Ancient Incantation
Activation:
DOUBLE-TAP DROP KEY
Effect:
- Enchant the sword for 10 seconds.
- During this period every hit launches small arcane rune projectiles.
- Rune projectiles track nearby enemies.
- Each rune deals 3 magic damage.
- Cooldown: 30 seconds.
================================================== WEAPON 11 — SHADOWED DIRK ==================================================
Ability:
Void Step
Activation:
SHIFT + RIGHT CLICK
Effect:
- Teleport player 4 blocks forward.
- Do not teleport through solid blocks.
- Grant Invisibility for 2 seconds.
- First attack while invisibility is active receives a guaranteed critical bonus.
- Cooldown: 12 seconds.
================================================== WEAPON 12 — CELESTIAL KATANA ==================================================
Ability:
Astral Dash
Activation:
RIGHT CLICK
Effect:
- Dash player forward up to 8 blocks.
- Leave cyan particle trail.
- Enemies in the dash path take 8 damage.
- Cooldown: 8 seconds.
================================================== WEAPON 13 — TIDAL EDGE ==================================================
Ability:
Abyssal Surge
Activation:
RIGHT CLICK
Effect:
- Fire water projectile/spout 10 blocks forward.
- Enemies hit are lifted approximately 3 blocks.
- Apply appropriate water particles.
- Cooldown: 14 seconds.
================================================== WEAPON 14 — ORICHALCUM GLAIVE ==================================================
Ability:
Arcane Burst
Activation:
LEFT CLICK when XP requirement is met
Effect:
- Consume 5 XP levels.
- Create 360-degree shockwave.
- Knock nearby entities backward.
- Apply Weakness I for 5 seconds.
- Cooldown: 10 seconds.
================================================== WEAPON 15 — SHADOW IRON CLAYMORE ==================================================
Ability:
Heavy Impact
Activation:
CRITICAL HIT
Effect:
- Increase critical strike damage by 40%.
- On successful critical impact, damage 10% of target shield/armor durability where technically possible.
- Play heavy impact particles and sound.
================================================== WEAPON 16 — GLACIAL RAPIER ==================================================
Ability:
Frostbite Lunge
Activation:
SPRINT + RIGHT CLICK
Effect:
- Lunge forward 5 blocks.
- If enemy is hit:
- Apply freezing effect. - Create ice/frost particles. - Apply appropriate Freeze effect for 5 seconds.
- Cooldown: 16 seconds.
Do not permanently place ice blocks around the world.
================================================== WEAPON 17 — AZURE SERPENT ==================================================
Ability:
Draconic Wrath
Activation:
SHIFT + LEFT CLICK
Effect:
- Fire a fast-moving blue dragon projectile.
- On collision create dragon-breath-style particles.
- Deal damage over time to enemies in the area.
- Cooldown: 20 seconds.
================================================== WEAPON 18 — VOIDFORGED BLADE ==================================================
Ability:
Stellar Rift
Activation:
RIGHT CLICK at target block
Effect:
- Maximum targeting distance: 15 blocks.
- Create a temporary void portal/rift.
- Duration: 4 seconds.
- Pull nearby entities toward the center.
- Deal continuous damage.
- Cooldown: 30 seconds.
Do not permanently destroy terrain.
================================================== WEAPON 19 — ABYSSAL GREATSWORD ==================================================
Ability:
Chaos Infusion
Activation:
SHIFT + F / SWAP HAND KEY
Effect:
- Cost: 2 hearts.
- Grant Strength II for 8 seconds.
- Grant Resistance I for 8 seconds.
- Create Nether/abyss particles around player.
- Cooldown: 25 seconds.
Do not allow the ability to kill the player from the health cost unless Minecraft's normal health rules require it.
================================================== GENERAL COOLDOWN SYSTEM ==================================================
Create a proper per-player cooldown manager.
Requirements:
- Cooldowns stored by UUID + ability.
- Cooldowns survive normal event handling correctly.
- No global cooldown unless explicitly specified.
- Show cooldown in action bar.
- Prevent ability spam.
- Clear cooldown data when appropriate.
- Avoid memory leaks.
================================================== CUSTOM WEAPON LORE ==================================================
Every weapon should have lore such as:
§7Custom Weapon §8━━━━━━━━━━━━ §6Ability: §f<Ability Name> §7Activation: §f<Activation> §cCooldown: §f<Seconds>s
Use Minecraft color codes and make each weapon visually distinct.
================================================== PARTICLES & SOUNDS ==================================================
Every special ability should have:
- Appropriate Minecraft particles
- Appropriate Minecraft sounds
- Impact effects
- Activation effects
Do not spam thousands of particles.
Effects should look impressive while remaining optimized for multiplayer.
================================================== ANTI-EXPLOIT ==================================================
Prevent:
- Normal players using admin give commands.
- Fake item names activating abilities.
- Renamed normal swords activating abilities.
- Lore-only spoofing.
- Copying an item using a normal anvil to create another functional weapon without the correct PDC.
- Ability activation from unrelated items.
Use PersistentDataContainer for verification.
================================================== DEATH / DROP / STORAGE ==================================================
Custom weapons should:
- Drop normally on death unless configured otherwise.
- Work after being placed in chests.
- Work after being moved through inventory.
- Work after server restart.
- Keep their custom identity.
- Not duplicate themselves accidentally.
================================================== TAB COMPLETION ==================================================
/givecoustomewepon <TAB>
Should suggest:
ShadowSwordDual Chlorospyre CrimsonFury TerranSunderer GildedHalberdier ArgentLance VerdantCleaver BlackenedSteel GoldVeinedSabre RunicBroadsword ShadowedDirk CelestialKatana TidalEdge OrichalcumGlaive ShadowIronClaymore GlacialRapier AzureSerpent VoidforgedBlade AbyssalGreatsword all
================================================== CONFIGURATION ==================================================
Create config.yml allowing the server owner to configure:
- Weapon damage
- Ability damage
- Cooldowns
- Particle effects
- Sounds
- Enable/disable individual weapons
- Enable/disable individual abilities
Use sensible defaults matching the specifications above.
================================================== MESSAGES ==================================================
Use configurable messages for:
- No permission
- Weapon received
- Unknown weapon
- Cooldown
- Ability activation
- Invalid target
- Missing XP
- Missing health
- Usage instructions
================================================== CODE QUALITY ==================================================
Use clean object-oriented architecture.
Recommended structure:
com.example.customweapons ├── CustomWeaponSystem.java ├── command/ │ └── GiveCustomWeaponCommand.java ├── weapon/ │ ├── CustomWeapon.java │ ├── WeaponManager.java │ ├── WeaponType.java │ └── WeaponFactory.java ├── ability/ │ ├── AbilityManager.java │ ├── CooldownManager.java │ └── individual ability classes ├── listener/ │ ├── WeaponInteractListener.java │ ├── WeaponDamageListener.java │ ├── PlayerJoinListener.java │ └── PlayerQuitListener.java └── util/ ├── ItemUtil.java ├── ParticleUtil.java └── SoundUtil.java
Use Paper 1.21.11-compatible APIs.
Do not use deprecated APIs when a modern Paper API alternative exists.
================================================== PLUGIN.YML ==================================================
Create a valid plugin.yml for Paper 1.21.11.
Include:
- name
- version
- main
- api-version
- author
- description
- commands
- permissions
Command:
givecoustomewepon
Permission:
customweapon.admin
================================================== FINAL REQUIREMENT ==================================================
Return the COMPLETE plugin project.
Include:
- Complete Java source code
- plugin.yml
- config.yml
- Complete package structure
- All listeners
- All weapon implementations
- All abilities
- Cooldown system
- PDC weapon identification
- Command system
- Tab completion
- Error handling
- Build instructions
- How to create the JAR
- Installation instructions for Paper 1.21.11
The final project must compile and run on Paper 1.21.11 with Java 21.
Do not give pseudocode.
Do not omit classes.
Do not use "implement this yourself" placeholders.
Provide working code for every weapon and ability.
Set up the Paper 1.21.11 / Java 21 project and configurable weapon registry with PDC-backed item identity.
Add the admin command, tab completion, per-player cooldowns, and event listeners.
Implement all 19 weapon abilities with bounded effects, damage, and cleanup behavior.
Created the CustomWeaponSystem Paper plugin project with Java 21 build configuration, plugin.yml, config.yml, PDC-identified weapon items, the OP-only /givecoustomewepon command, tab completion, cooldown tracking, listeners, and implementations for the 19 listed weapons.
Build and install
Build with Java 21 and Gradle installed:
gradle buildCopy
build/libs/CustomWeaponSystem-1.0.0.jarinto the Paper server’splugins/folder.Restart the server. Configure the plugin in
plugins/CustomWeaponSystem/config.yml.Use
/givecoustomewepon <weapon|all>as an OP.
A few requested mechanics have API or implementation limits in this version: Piercing Lance’s bonus damage still follows normal armor and shield handling; Shadow Iron Claymore does not damage armor durability; and Verdant Cleaver applies poison on melee hits rather than only on sweep attacks.
package com.example.customweapons;
import com.example.customweapons.ability.AbilityManager;
import com.example.customweapons.command.GiveCustomWeaponCommand;
import com.example.customweapons.listener.WeaponListener;
import com.example.customweapons.weapon.WeaponManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class CustomWeaponSystem extends JavaPlugin {
private WeaponManager weaponManager;
private AbilityManager abilityManager;
@Override
public void onEnable() {
saveDefaultConfig();
weaponManager = new WeaponManager(this);
abilityManager = new AbilityManager(this, weaponManager);
GiveCustomWeaponCommand command = new GiveCustomWeaponCommand(this, weaponManager);
getCommand("givecoustomewepon").setExecutor(command);
getCommand("givecoustomewepon").setTabCompleter(command);
Bukkit.getPluginManager().registerEvents(new WeaponListener(this, weaponManager, abilityManager), this);
}
@Override
public void onDisable() {
if (abilityManager != null) abilityManager.shutdown();
}
}