Create a COMPLETE, PRODUCTION-READY Minecraft Paper plugin named "Sword_Smp".
This is NOT a simplified demo.
Build the plugin from scratch and implement every feature below as a genuinely functional system.
The final result must be a working ".jar" plugin for Paper 1.21.x.
==================================================
- BASIC INFORMATION
==================================================
Plugin Name:
Sword_Smp
Author: itz_miikey
Target:
Paper 1.21.x
plugin.yml:
api-version: '1.21'
Use clean Java architecture with separate classes/managers where appropriate, such as:
- SwordManager
- SharpnessManager
- LifeManager
- RevivalManager
- FearManager
- CombatManager
- DataManager
- CommandManager
- GUIManager
- ConfigManager
- PlayerManager
Use UUIDs for all player data.
All important data MUST persist through:
- Player relog
- Server restart
- Plugin reload
- Death
- Respawn
- Server crash/restart as safely as possible
==================================================
- SPECIAL SMP SWORD
Every first-time player receives exactly ONE special SMP Sword.
Material:
WOODEN_SWORD
Display name:
SMP Sword
Sharpness:
I
The sword must be:
- Unbreakable
- Full durability
- PDC identified
- Non-craftable
- Persistent
- Bound to the Sword SMP system
DO NOT identify it only by name or lore.
Use PersistentDataContainer.
Required PDC key:
swordsmp_special_sword
Store additional information using PDC as necessary, including:
- Sword type
- Sharpness level
- Other Sword SMP state
The displayed name MUST be exactly:
SMP Sword
Do NOT use:
Special SMP Sword
==================================================
- SWORD DUPLICATION PROTECTION
A player may NEVER have more than ONE valid SMP Sword.
Prevent duplication through:
- First join
- Respawn
- Death
- Relog
- Server restart
- "/swordsmp give"
- Revival
- Admin commands
- Diamond upgrade
- Wooden reset
- Sharpness changes
Before giving a sword, scan the player's inventory and determine whether a valid PDC SMP Sword already exists.
If one exists:
DO NOT create another.
If multiple somehow exist due to an edge case, safely consolidate them into exactly ONE.
==================================================
- SMP SWORD CANNOT BE DROPPED
The SMP Sword MUST NOT be droppable by players.
Prevent:
- Q drop
- Ctrl+Q drop
- Normal inventory drop
- Dragging the sword outside the inventory
- Any normal player action that drops the sword
- Death item drops
The player MUST still be able to:
- Move the sword between inventory slots
- Use the sword
- Attack with it
- Upgrade it
Use PDC to detect it.
Do NOT rely only on display name.
==================================================
- SWORD DEATH PROTECTION
When a player dies, their SMP Sword must NOT be dropped into the world.
After respawn, they must have exactly ONE valid SMP Sword.
If necessary:
- Remove the sword from death drops
- Restore it after respawn
Never produce:
- Zero swords
- Two swords
- A dropped sword + inventory sword
==================================================
- BLOCK ALL NORMAL SWORD CRAFTING
Completely block normal crafting of:
- Wooden Sword
- Stone Sword
- Iron Sword
- Golden Sword
- Diamond Sword
- Netherite Sword
- Copper Sword
Players must NOT be able to bypass this through:
- Crafting tables
- Inventory crafting
- Any normal vanilla crafting recipe
The crafting result should be blocked/disabled so the player cannot take the sword.
The special SMP Sword is the ONLY sword used by the SMP progression system.
==================================================
- WOODEN → DIAMOND SYSTEM
Config:
diamond-sword-days: 7
After the configured number of REAL-WORLD days from the player's first join, the SMP Sword becomes eligible for Diamond upgrade.
Example:
First join Monday.
diamond-sword-days = 7.
Sword becomes Diamond after the required 7 real-world days.
Upgrade:
WOODEN SMP SWORD ↓ DIAMOND SMP SWORD
The upgrade MUST preserve:
- Sharpness
- Kill count
- PDC identity
- Unbreakable property
- Sword state
Example:
Wooden SMP Sword Sharpness VIII ↓ Diamond SMP Sword Sharpness VIII
DO NOT reset Sharpness.
The upgrade should happen only once.
==================================================
- SHARPNESS SYSTEM
Maximum:
Sharpness X
Levels:
I II III IV V VI VII VIII IX X
Kill progression:
I → II = 1 kill
II → III = 2 kills
III → IV = 2 kills
IV → V = 2 kills
V → VI = 3 kills
VI → VII = 3 kills
VII → VIII = 3 kills
VIII → IX = 3 kills
IX → X = 3 kills
Only kills made using the player's valid SMP Sword count.
Kills with:
- Normal swords
- Fists
- Other weapons
- Projectiles
- Mobs
must NOT increase SMP Sword Sharpness.
Only valid player kills using the SMP Sword should count.
==================================================
- CRITICAL: SHARPNESS VI–X MUST BE REAL
THIS IS ONE OF THE MOST IMPORTANT REQUIREMENTS.
Minecraft normally has practical limitations around vanilla Sharpness.
Therefore:
DO NOT depend entirely on vanilla enchantment levels for Sharpness VI–X.
Implement a REAL CUSTOM DAMAGE SYSTEM.
The sword's internal Sharpness level must be stored in PDC/player data.
Sharpness VI–X must genuinely deal more damage.
Required behavior:
Sharpness V < Sharpness VI < Sharpness VII < Sharpness VIII < Sharpness IX < Sharpness X
The difference must be observable in real combat.
It must work against:
- Players
- Mobs
It must integrate safely with Minecraft armor and damage calculations.
Avoid double-applying damage.
If vanilla Sharpness already contributes damage, make sure the custom calculation does not accidentally add the same Sharpness bonus twice.
Do NOT implement Sharpness VI–X as:
- Lore only
- Name only
- Cosmetic effect
- Fake enchantment
- Number displayed in text only
The ACTUAL damage must increase.
==================================================
- SHARPNESS COMMANDS
Implement:
/swordsmp sharpness <player> <1-10>
/swordsmp forcelevel <player> <1-10>
Both commands must set the ACTUAL internal Sharpness.
Example:
/swordsmp sharpness Steve 10
Steve must genuinely deal Sharpness X damage.
It must synchronize:
- Player data
- Sword PDC
- Sharpness display
- Kill progression
- Actual combat damage
The same applies to:
/swordsmp forcelevel Steve 10
==================================================
- SHARPNESS DEATH RESET
Config:
reset-at-level: 5
reset-to-level: 1
Behavior:
Sharpness I–IV:
Death → Keep current Sharpness.
Sharpness V–X:
Death → Reset to Sharpness I.
Examples:
Sharpness IV ↓ Death ↓ Sharpness IV
Sharpness V ↓ Death ↓ Sharpness I
Sharpness X ↓ Death ↓ Sharpness I
The reset must update:
- Player data
- Sword PDC
- Sword display
- Actual combat damage
- Kill progression state
Do NOT leave hidden Sharpness X damage after reset.
==================================================
- SHARPNESS X EVENT
When a player reaches Sharpness X for the first time:
- Trigger thunderstorm/weather effect
- Play dramatic Warden-related sound
- Send configurable server-wide message
Example:
[SEBASTIAN] %player% has reached the maximum power.
Everything must be configurable.
The event must trigger ONCE when reaching X.
Do NOT trigger it repeatedly from inventory updates.
==================================================
- SHARPNESS X DEATH EVENT
If a Sharpness X player dies:
- Trigger dramatic weather/thunder
- Play Warden-related sound
- Reset Sharpness to I
- Reset actual custom damage to Sharpness I
- Update sword PDC
- Save data
- Send configurable Sebastian message
Example:
[SEBASTIAN] Your power has been taken from you...
All text configurable.
==================================================
- STRENGTH I
Players participating in the SMP should receive:
Strength I
Potion effect:
STRENGTH
Amplifier:
0
This means actual Minecraft Strength I.
The effect should be continuously maintained appropriately.
Do NOT give Strength II or higher.
Avoid unnecessary visible potion-effect spam/particles unless configured.
Restore Strength I after:
- Respawn
- Relog
- Server restart
- Plugin reload
If a player is eliminated, do not allow them to retain unintended combat advantages.
When revived, restore Strength I.
==================================================
- LIFE SYSTEM
Every player starts with:
10 lives
Config:
life-system: enabled: true starting-lives: 10 max-lives: 10
Lives persist permanently.
==================================================
- KILL LIFE TRANSFER
When Player A kills Player B:
Player B:
-1 life
Player A:
+1 life
Killer cannot exceed max-lives.
Victim cannot go below 0.
Example:
A = 7 B = 4
A kills B
A = 8 B = 3
If A already has 10:
A = 10 B = 3
Do not exceed max-lives.
==================================================
- LIFE ACTION BAR
Always display current lives above the hotbar.
Config:
life-system: actionbar: enabled: true format: "&c❤ Lives: &f%lives%" eliminated-format: "&4☠ Lives: 0 &c&l— ELIMINATED"
Update immediately whenever lives change.
==================================================
- KILL TITLES
After a kill:
Killer:
Title: +1 LIFE
Subtitle:
You now have %lives% LIVES
Victim:
Title: -1 LIFE
Subtitle:
You have %lives% LIVES remaining
If victim reaches 0:
Title: 0 LIVES
Subtitle:
YOU ARE ELIMINATED
Everything configurable.
==================================================
- ELIMINATION
At 0 lives:
lives = 0
eliminated = true
This state must persist through:
- Relog
- Restart
- Reload
An eliminated player must not be treated as a normal alive player.
Default elimination behavior:
ELIMINATE
Implement a configurable elimination restriction.
If the plugin does not use actual server bans, do NOT modify normal Minecraft bans.
==================================================
- REVIVAL PAPER
When a player becomes eliminated:
Issue EXACTLY ONE special Revival Paper.
Paper requirements:
- Material: PAPER
- PDC identifier
- Linked to eliminated player's UUID
- Non-craftable
- Cannot duplicate
- Persists safely
- Consumed after successful revival
Config:
revival: enabled: true life-cost: 2 revived-player-lives: 1 confirmation-timeout: 30 paper-name: "&c&lREVIVAL PAPER"
PDC example:
swordsmp_revival_paper
Store target UUID in PDC.
IMPORTANT:
The paper must actually be generated when elimination occurs.
Do NOT merely display a message saying a paper exists.
==================================================
- REVIVAL PAPER DUPLICATION PROTECTION
An eliminated player can have only ONE valid Revival Paper issued for their elimination state.
Do NOT create another paper on:
- Relog
- Restart
- Respawn
- Plugin reload
Track:
revivalPaperIssued
in persistent player data.
If the paper is manually removed by an admin, do not automatically regenerate it unless explicitly requested through:
/swordsmp givepaper <player>
==================================================
- REVIVAL GUI
Right-clicking a valid Revival Paper opens a custom GUI.
GUI title:
&4&lREVIVE A PLAYER
Configurable.
Show player heads of valid revival targets.
Valid target:
- Eliminated
- Not the reviver
- Not already alive
Clicking a head selects the target.
Hovering shows target name.
==================================================
- REVIVAL CONFIRMATION
After selecting:
Reviving %target% will cost you %cost% lives.
Type YES to confirm or NO to cancel.
YES is case-insensitive.
NO cancels.
Default timeout:
30 seconds.
If timeout expires:
- No lives removed
- No revival
- Paper remains
Before YES is executed, revalidate:
- Target still eliminated
- Reviver still alive
- Reviver has enough lives
- Request has not expired
- Paper is still valid
Prevent duplicate confirmation execution.
==================================================
- SUCCESSFUL REVIVAL
On successful revival:
Reviver:
-2 lives
Target:
+1 life
Target:
eliminated = false
Restore exactly ONE SMP Sword.
Restore Strength I.
Consume/invalidate the Revival Paper.
Save immediately.
Show revival title.
Config:
title: enabled: true title: "&a&lREVIVED" subtitle: "&fYou have returned to the SMP!" fade-in: 10 stay: 50 fade-out: 20
Do not create duplicate swords.
==================================================
- ADMIN PERMISSION
Main permission:
swordsmp.admin
Default:
op
Normal players cannot use admin commands.
==================================================
- ADMIN LIFE COMMANDS
Implement:
/swordsmp setlives <player> <amount>
Rules:
- Cannot exceed max lives
- Cannot go below 0
- 0 = eliminated
- «0 = alive»
- Save immediately
- Update action bar
Implement:
/swordsmp addlives <player> <amount>
/swordsmp removelives <player> <amount>
Never allow negative lives.
If lives reach 0:
eliminate.
==================================================
- FORCE REVIVE
Command:
/swordsmp revive <player>
Admin can revive any eliminated player.
Rules:
- No life cost to admin
- No paper required
- Give configured revival lives
- eliminated = false
- Restore exactly one SMP Sword
- Restore Strength I
- Save immediately
- Works for offline players
- If online, update action bar and show title
If already alive:
Send configurable message.
==================================================
- FORCE ELIMINATE
Command:
/swordsmp eliminate <player>
Set:
lives = 0 eliminated = true
Works online/offline.
If already eliminated:
Do NOT create another Revival Paper.
Do NOT duplicate items.
==================================================
- GIVE REVIVAL PAPER
Command:
/swordsmp givepaper <player>
Give exactly one valid Revival Paper.
Do not create duplicates.
This command exists for scripted SMP events.
==================================================
- REMOVE REVIVAL PAPER
Command:
/swordsmp removepaper <player>
Remove the player's special Revival Paper.
Useful for scripted events.
==================================================
- GIVE SWORD
Command:
/swordsmp give <player>
Give the player's valid SMP Sword.
If the player already has one:
Do NOT create another.
If necessary, update/repair the existing sword.
==================================================
- RESET PLAYER
Command:
/swordsmp reset <player>
Reset to:
Lives = starting-lives
Eliminated = false
Sword = Wooden SMP Sword
Sharpness = I
Kills = 0
Diamond unlocked = false
Revival Paper issued = false
Clean up duplicate swords/papers appropriately.
Save immediately.
==================================================
- WOODEN COMMANDS
Implement:
/swordsmp wooden
/swordsmp woodenall
/swordsmp setwooden
/swordsmp unlockdiamond
These must synchronize:
- Sword material
- PDC
- Diamond state
- Sharpness
DO NOT reset Sharpness unless explicitly required.
==================================================
- SET DAYS
Command:
/swordsmp setdays <days>
Update the configured/required Diamond unlock period.
Do not corrupt existing player data.
==================================================
- PLAYER INFO
Command:
/swordsmp info <player>
Display:
[SWORD SMP]
Player UUID Lives Eliminated Sword Type Sharpness Kills toward next Sharpness Diamond Unlocked First Join Revival Paper status
Example:
[SWORD SMP] Player: Steve Lives: 7 Eliminated: false Sword: Diamond Sharpness: X Kills: 0 Diamond Unlocked: true Revival Paper: No
==================================================
- UNBAN / UNELIMINATE
Command:
/swordsmp unban <player>
This command must remove ONLY the plugin's own elimination restriction.
Do NOT bypass Minecraft's normal server ban system unless explicitly configured.
Set:
eliminated = false
Give configured revival lives.
Restore SMP Sword.
Restore Strength I.
Save immediately.
==================================================
- FEAR EVENT
Trigger:
Shift + Right Click
while holding the SMP Sword.
Minecraft does not expose a literal Shift key event, so use:
PlayerInteractEvent
and check:
player.isSneaking()
The player must be looking at another player.
Target must be within configurable range.
Config:
fear-event: enabled: true range: 30 cooldown: 60
Cooldown measured in seconds.
Prevent duplicate triggering from one interaction.
==================================================
- FEAR EVENT SCREEN ONLY
Fear Event MUST NOT send normal chat messages.
Only the target sees the titles.
First:
Title: &4&l[SEBASTIAN]
Subtitle: &cThe Descendant of Satan is watching you...
Then after:
40 ticks
Second:
Title: &4&l[SEBASTIAN]
Subtitle: &c&lRUN...
Config:
fear-event: enabled: true range: 30 cooldown: 60
screen: enabled: true
first: title: "&4&l[SEBASTIAN]" subtitle: "&cThe Descendant of Satan is watching you..."
second: title: "&4&l[SEBASTIAN]" subtitle: "&c&lRUN..."
delay-between-messages: 40
fade-in: 10 stay: 30 fade-out: 10
Only the target receives the titles.
The triggering player does NOT receive them unless they are also the target.
Prevent overlapping Fear Events on the same target.
==================================================
- FEAR COMMANDS
Keep:
/swordsmp fear <player>
/swordsmp fear
"/swordsmp fear <player>" manually triggers the event for the target.
"/swordsmp fear" should use the plugin's default/manual behavior.
==================================================
- COMBAT SYSTEM
Combat calculations must safely distinguish:
- Normal weapons
- SMP Sword
- Other items
Only SMP Sword Sharpness should use the custom Sharpness VI–X damage calculation.
Do not accidentally modify damage from:
- Fists
- Normal swords
- Axes
- Bows
- Crossbows
- Other weapons
Only valid SMP Sword attacks should receive custom Sharpness damage.
==================================================
- LIFE KILL DETECTION
Life transfer should happen only for actual player kills.
When Player A kills Player B:
A gets +1 life.
B loses -1 life.
Do not reward life for:
- Environmental deaths
- Fall damage
- Mobs
- Suicide
- Other non-player causes
If the killer is using the SMP Sword, also process Sharpness kill progression.
Prevent the same death from being processed twice.
==================================================
- CONFIGURATION
Create a clean "config.yml".
Include at minimum:
diamond-sword-days: 7
reset-at-level: 5
reset-to-level: 1
life-system: enabled: true starting-lives: 10 max-lives: 10
actionbar: enabled: true format: "&c❤ Lives: &f%lives%" eliminated-format: "&4☠ Lives: 0 &c&l— ELIMINATED"
revival: enabled: true life-cost: 2 revived-player-lives: 1 confirmation-timeout: 30 paper-name: "&c&lREVIVAL PAPER"
fear-event: enabled: true range: 30 cooldown: 60
screen: enabled: true
first: title: "&4&l[SEBASTIAN]" subtitle: "&cThe Descendant of Satan is watching you..."
second: title: "&4&l[SEBASTIAN]" subtitle: "&c&lRUN..."
delay-between-messages: 40
fade-in: 10 stay: 30 fade-out: 10
Include configurable messages for:
- Sharpness level up
- Sharpness X
- Sharpness X death
- Life gained
- Life lost
- Elimination
- Revival
- Insufficient lives
- Already alive
- Already eliminated
- Admin errors
- Invalid arguments
- No permission
- Sword given
- Paper given
- Paper removed
- Reset
- Fear cooldown
Use "&" color codes.
==================================================
- DATA STORAGE
Use a reliable persistent local storage system.
YAML/JSON is acceptable for this SMP.
Store:
UUID firstJoin lives eliminated sharpnessLevel kills diamondUnlocked revivalPaperIssued
Also store any additional state needed for safe operation.
Save immediately after important changes.
Use safe file handling to reduce corruption risk.
==================================================
- COMMAND LIST
Implement:
/swordsmp
/swordsmp reload
/swordsmp give <player>
/swordsmp reset <player>
/swordsmp info <player>
/swordsmp setdays <days>
/swordsmp forcelevel <player> <1-10>
/swordsmp sharpness <player> <1-10>
/swordsmp unlockdiamond
/swordsmp wo
Create the Paper 1.21 plugin scaffold, configuration, and persistent UUID-based player data.
Implement sword identity/protection, sharpness and combat, lives/elimination, revival, fear events, and admin commands.
Wire listeners and lifecycle restoration so state survives relogs, deaths, and restarts.
Created the Sword_Smp Paper 1.21 plugin project with its Java 21 Gradle scaffold, plugin.yml, and configurable defaults. It includes persistent player data; PDC-identified sword and revival paper systems; custom Sharpness VI–X damage; lives, elimination and revival; crafting/drop/death protections; Fear Event titles; and the requested admin commands.
The project is ready for Gradle packaging; I haven’t verified a built JAR in this session.
I already have a working "Sword_Smp" Paper 1.21.x plugin.
IMPORTANT:
DO NOT rebuild the entire plugin from scratch.
The existing plugin is already working correctly. I only need you to MODIFY/UPGRADE the existing systems described below while preserving every other existing feature.
Do NOT remove or break:
- SMP Sword
- Sharpness I–X
- Custom Sharpness VI–X damage
- Life System
- Revival System
- Revival Paper
- Revival GUI
- Fear Event
- Strength I
- Diamond Sword upgrade
- Sword drop protection
- Sword crafting protection
- PDC systems
- Persistent player data
- Existing admin commands
- Existing configuration
- Existing working mechanics
Only implement the changes below.
==================================================
- ELIMINATED PLAYERS MUST BE BANNED FROM THE SMP
==================================================
CURRENT BEHAVIOR:
When a player reaches 0 lives, they are currently put into Spectator Mode.
CHANGE THIS.
DO NOT put eliminated players into Spectator Mode.
When a player's lives reach:
0
they must become:
eliminated = true
and they must be unable to continue playing.
The player must be kicked/banned from the server using the plugin's own elimination system.
IMPORTANT:
This should NOT necessarily use Minecraft's normal "/ban" system.
Use a custom/plugin-controlled elimination restriction so the plugin can automatically allow the player to join again after revival.
==================================================
- ELIMINATED PLAYER JOIN RESTRICTION
Once a player is eliminated:
Lives = 0 Eliminated = true
They must NOT be allowed to join the server normally.
When an eliminated player attempts to join, prevent the login.
Show a configurable message such as:
&4&l[SWORD SMP] &cYou have been eliminated. &7You cannot join the SMP until another player revives you.
The player must remain unable to join until:
- An admin uses "/swordsmp revive <player>", OR
- Another player successfully revives them using the Revival Paper system, OR
- "/swordsmp unban <player>" is used according to the existing plugin rules.
IMPORTANT:
The join restriction must be based on the player's persistent UUID/data.
Do NOT rely only on username.
==================================================
- REVIVAL MUST AUTOMATICALLY REMOVE THE RESTRICTION
When an eliminated player is successfully revived:
eliminated = false
and they receive their configured revival lives.
The plugin must automatically remove the plugin's elimination restriction.
The player should then be able to join the server normally.
If the player is offline when revived:
- Update their persistent data.
- Remove the elimination restriction.
- Restore their SMP Sword state.
- Restore Strength I when they next join.
If an admin uses:
/swordsmp revive <player>
the same behavior must occur.
If an admin uses:
/swordsmp unban <player>
the plugin restriction must also be removed.
==================================================
- DO NOT USE SPECTATOR MODE
Eliminated players must NOT be put into:
- Spectator
- Creative
- Adventure
as a replacement for elimination.
They should simply be unable to join the SMP until revived.
If an eliminated player is online at the moment they reach 0 lives:
- Set lives to 0.
- Set eliminated = true.
- Save data immediately.
- Remove their SMP Sword safely.
- Apply the plugin's elimination behavior.
- Kick them from the server.
- Prevent them from reconnecting until revived.
Do NOT leave them online in spectator mode.
==================================================
- REVIVAL PAPER SYSTEM MUST CONTINUE WORKING
The existing Revival Paper system must continue working.
An eliminated player can be revived by another player using the existing Revival Paper.
After successful revival:
- eliminated = false
- Target receives configured revival lives
- Plugin elimination restriction is removed
- Target's SMP Sword is restored
- Strength I is restored
- Revival Paper is consumed
- Data is saved immediately
The target should then be able to join the server normally.
==================================================
- MAX LIVES SYSTEM — NEW LIFE ITEM
Add a new system for players who already reached the configured maximum lives.
Example:
If:
max-lives: 20
and a player currently has:
20 lives
then they cannot receive another normal life directly.
Instead, the extra life must become a special Nether Star item.
The item represents ONE stored Life.
==================================================
- LIFE NETHER STAR
When a player would receive +1 life but they are already at max-lives:
DO NOT increase their lives.
Instead:
DROP exactly ONE special Nether Star item.
Material:
NETHER_STAR
Display name:
Life
The item should preferably use a configurable colored name, for example:
&c&lLife
but the default visible name should be:
Life
IMPORTANT:
Identify the item using PersistentDataContainer.
Do NOT identify it only by the display name.
Use a PDC key such as:
swordsmp_life_item
The item must be recognized as a valid Sword SMP Life item only through PDC.
==================================================
- LIFE ITEM MUST BE DROPPED AT THE CORRECT LOCATION
When the player reaches max lives and would normally receive another life:
Example:
Player = 20/20 lives
Player kills another player.
Normally killer receives +1 life.
Because they are already at 20:
DO NOT set them to 21.
Instead:
Drop ONE Life Nether Star.
The star should drop safely near the player/killer.
Do NOT create multiple stars from the same kill.
Prevent duplicate life-item rewards if the same death event is accidentally processed twice.
==================================================
- LIFE ITEM CAN STORE EXTRA LIVES
A player can collect multiple Life Nether Stars.
Example:
Player has:
20 lives
Inventory:
Life Life Life
These represent three additional stored lives.
They should remain as physical items until used.
==================================================
- USING THE LIFE ITEM
A player can use the Life Nether Star by:
RIGHT CLICK
while holding the special Life Nether Star.
When right-clicked:
IF player's current lives are BELOW max-lives:
- Increase lives by exactly 1.
- Remove exactly ONE Life Nether Star from the player's hand/inventory.
- Update Action Bar immediately.
- Save player data immediately.
- Play configurable sound/effect if configured.
Example:
Max lives = 20
Player:
19 lives
Uses Life item.
Result:
20 lives
One Life item removed.
==================================================
- LIFE ITEM CANNOT BE USED AT MAX LIVES
If:
Current lives = max-lives
and player right-clicks the Life Nether Star:
DO NOT consume the item.
DO NOT increase lives.
Keep the Life item in their inventory.
Send configurable message:
&cYou already have the maximum number of lives.
Example:
20/20 lives + Life item ↓ Still 20/20 Life item remains
==================================================
- ONLY THE OWNER CAN USE THEIR LIFE ITEM
The player holding the Life item is the only player who can use it.
Normal Minecraft inventory behavior should allow players to physically possess/move/trade the item if desired, BUT when a player right-clicks it, the CURRENT HOLDER is the one who receives the life.
The system must never increase another player's lives remotely.
Example:
Steve has a Life item.
Steve gives the item to Alex.
Alex right-clicks it.
Alex receives +1 life.
Steve receives nothing.
This is based on the player currently using the item.
==================================================
- LIFE ITEM MUST BE ONE-TIME USE
When successfully used:
1 Life item
becomes:
+1 life
Then exactly ONE Nether Star is removed.
Example:
Inventory:
3 Life stars
Player uses one.
Result:
2 Life stars
+1 life
Do NOT remove all Life items.
Do NOT increase lives multiple times from one click.
Prevent double-triggering from:
- PlayerInteractEvent
- Off-hand interaction
- Main-hand interaction
- Duplicate event firing
One successful right-click = maximum ONE life.
==================================================
- LIFE ITEM SHOULD NOT WORK FOR ELIMINATED PLAYERS
An eliminated player cannot join the server normally anyway.
However, the Life item system must also safely check:
if eliminated == true:
Do NOT allow Life item usage.
Do NOT increase lives.
Do NOT consume the item.
==================================================
- LIFE REWARD LOGIC
Update the existing life reward system.
Whenever a player should receive +1 life:
IF current lives < max-lives:
current lives += 1
ELSE:
current lives stays at max-lives
AND:
spawn exactly ONE Life Nether Star.
Example:
max-lives = 20
Player = 18
Kill:
18 → 19
No item.
Player = 19
Kill:
19 → 20
No item.
Player = 20
Kill:
20 → 20
Drop one Life item.
This logic must apply to every existing mechanic that gives a player +1 life where appropriate.
==================================================
- IMPORTANT — LIFE ITEM VS REVIVAL SYSTEM
Do NOT confuse:
Life Nether Star
with:
Revival Paper.
They are two completely different items.
REVIVAL PAPER:
Used to revive an eliminated player.
LIFE NETHER STAR:
Used by an alive player to convert a stored extra life into +1 current life.
They must have different PDC identifiers.
For example:
Revival Paper:
swordsmp_revival_paper
Life:
swordsmp_life_item
==================================================
- LIFE WITHDRAW COMMAND
Add a new admin/player command:
/swordsmp withdrawlives <amount>
This command should allow an alive player to convert some of their current lives into Life Nether Star items.
Example:
Player:
20 lives
Command:
/swordsmp withdrawlives 5
Result:
Player:
15 lives
Inventory/dropped items:
5 × Life Nether Star
The command must never allow the player to go below 1 life.
IMPORTANT:
A player must NOT be able to withdraw their final life.
Minimum after withdrawal:
1 life
Example:
Player has 10 lives.
"/swordsmp withdrawlives 9"
Allowed:
10 → 1
9 Life items created.
But:
"/swordsmp withdrawlives 10"
MUST be rejected.
They cannot go:
10 → 0
using this command.
==================================================
- WITHDRAW COMMAND PERMISSION
The withdraw command should be available to normal players because it is part of the Life System.
Do NOT require:
swordsmp.admin
unless the existing plugin architecture specifically requires a separate configurable permission.
Recommended permission:
swordsmp.withdraw
Default:
true
Admin users should automatically have access through normal permission inheritance if configured.
==================================================
- WITHDRAW COMMAND VALIDATION
Handle:
/swordsmp withdrawlives 1
/2
/5
etc.
Reject:
0
negative numbers
non-numbers
amount greater than player's available withdrawable lives
withdrawal that would reduce player below 1 life
eliminated players
Example:
Player = 5 lives
"/swordsmp withdrawlives 5"
REJECT.
Maximum allowed:
4
Because player must retain at least 1 life.
==================================================
- INVENTORY FULL PROTECTION FOR WITHDRAW
If the player withdraws multiple lives and their inventory does not have enough space:
Do NOT silently delete Life items.
Do NOT remove lives without giving the corresponding items.
Safely handle inventory capacity.
Preferred behavior:
Check available inventory space BEFORE changing the player's lives.
If there is not enough space for all requested Life items:
Cancel the command and tell the player they need more inventory space.
Example:
Player wants to withdraw 5.
Only 3 inventory slots available.
Do not perform the withdrawal.
Show:
&cYou do not have enough inventory space for %amount% Life items.
==================================================
- LIFE ITEM DROP PROTECTION / BEHAVIOR
Life Nether Stars should behave as physical items.
They can exist in:
- Inventory
- Ground
- Chests
- Other normal storage
They should stack if appropriate.
Prefer a maximum stack size of 64.
However, each item must remain a valid PDC Life item.
Do NOT accidentally convert normal Nether Stars into Life items.
Only plugin-generated Life items should work as Life items.
==================================================
- LIFE ITEM DISPLAY
Default:
Material:
NETHER_STAR
Name:
&c&lLife
Optional lore:
&7Right-click to gain 1 Life.
&7Maximum lives: %max-lives%
The lore is informational only.
PDC is the real identifier.
==================================================
- LIFE ITEM RIGHT-CLICK DETECTION
Detect:
RIGHT_CLICK_AIR
RIGHT_CLICK_BLOCK
while holding a valid Life Nether Star.
Prevent the item from triggering twice.
Cancel the interaction if necessary to prevent unwanted normal Nether Star behavior.
Only consume one item when the life increase succeeds.
==================================================
- LIFE ACTION BAR
Continue using the existing action bar.
Example:
&c❤ Lives: &f20
If player has Life items, optionally add:
&7Life Items: &f3
This second part should be configurable.
Do NOT break the existing action bar.
==================================================
- LIFE ITEM CONFIGURATION
Add configuration:
life-item: enabled: true material: NETHER_STAR name: "&c&lLife" lore:
- "&7Right-click to gain 1 Life."
- "&7Maximum lives: &f%max-lives%"
pdc-key: "swordsmp_life_item" stack-size: 64 sound: enabled: true type: "ENTITY_PLAYER_LEVELUP" volume: 1.0 pitch: 1.0
Add configurable messages:
messages: life-item: received: "&aYou received a Life item!" used: "&a+1 Life! &7You now have &f%lives%&7/&f%max-lives%" max-lives: "&cYou already have the maximum number of lives." inventory-full: "&cYou do not have enough inventory space." withdraw-success: "&aYou withdrew &f%amount% &aLife(s)." withdraw-invalid: "&cYou cannot withdraw that many lives." withdraw-minimum: "&cYou must keep at least 1 Life." disabled: "&cThe Life item system is disabled."
==================================================
- CONFIGURABLE MAX LIVES
The system MUST use:
life-system.max-lives
from config.
Do NOT hardcode 20.
Examples:
max-lives: 10
or:
max-lives: 20
or:
max-lives: 50
must all work.
The Life Nether Star system automatically adapts.
Example:
max-lives = 20
20 = maximum current lives.
max-lives = 10
10 = maximum current lives.
==================================================
- ADMIN SETLIVES INTERACTION
Existing command:
/swordsmp setlives <player> <amount>
must continue working correctly.
If an admin sets:
/swordsmp setlives Steve 20
and max-lives = 20:
Steve has 20 current lives.
If admin tries:
/swordsmp setlives Steve 25
the existing maximum-life rule should apply.
Do NOT allow current lives to exceed max-lives.
If the plugin has Life items, do not automatically create 5 Life items unless explicitly designed/configured to do so.
Keep the admin set command predictable.
==================================================
- ADDLIVES INTERACTION
Existing:
/swordsmp addlives <player> <amount>
must also respect max-lives.
Example:
max = 20
Player = 18
"/swordsmp addlives Steve 2"
Result:
20 lives.
Player = 20
"/swordsmp addlives Steve 2"
Do NOT make:
22 lives.
Instead, if the existing design treats overflow as Life items, create exactly 2 Life Nether Stars.
This prevents lives from ever exceeding max-lives.
==================================================
- KILL LIFE REWARD DUPLICATION PROTECTION
A single player death must never produce:
- Two +1 life rewards
- Two Life Nether Stars
- One life + one Life Nether Star accidentally
depending on the current life count.
For each valid player kill:
If killer < max: +1 life
If killer >= max: exactly ONE Life item per +1 life reward
Prevent duplicate processing of the same death.
==================================================
- OFFLINE / PERSISTENT DATA
The following must remain persistent:
- UUID
- Lives
- Max lives comes from config
- Eliminated
- Sharpness
- Kills
- Diamond unlock
- Revival Paper status
- Plugin elimination restriction
Life Nether Stars are physical inventory/world items, so they must naturally persist through normal Minecraft item storage/drop behavior.
==================================================
- ELIMINATION + LIFE ITEMS
If a player has:
20 lives + 5 Life items
and loses lives through combat:
20 → 19
The Life items remain untouched.
They can later use one Life item:
19 → 20
The item is consumed.
If they are eliminated:
Lives = 0
They cannot join the server until revived.
Their Life items must NOT be automatically converted into revival.
Do NOT automatically consume Life items during elimination.
Revival remains controlled by the existing Revival Paper system.
==================================================
- PLAYER REVIVAL + LIFE ITEMS
When a player is revived:
They receive the configured revival lives.
Existing Life items should remain separate.
Do not automatically convert Life items into current lives.
Do not duplicate them.
==================================================
- COMMAND HELP
Add to:
/swordsmp
help menu:
/swordsmp withdrawlives <amount>
Explain:
Withdraw current lives into Life items.
Example:
/swordsmp withdrawlives 5
==================================================
- TAB COMPLETION
Add tab completion for:
withdrawlives
and amount suggestions where practical.
Do not break existing tab completion.
==================================================
- ELIMINATION MESSAGE CONFIG
Add configurable messages:
elimination: kick-message:
- "&4&l[SWORD SMP]"
- "&cYou have been eliminated."
- "&7You cannot join until another player revives you."
join-denied:
- "&4&l[SWORD SMP]"
- "&cYou are eliminated."
- "&7Wait until you are revived."
Also ensure the plugin's elimination restriction does NOT conflict with normal Minecraft bans.
==================================================
- TESTING REQUIREMENTS
Before producing the updated JAR, test all of the following.
ELIMINATION:
Player has 1 life.
Player dies.
Result:
0 lives eliminated = true Player is kicked Player is NOT spectator Player cannot reconnect.
REVIVAL:
Admin or valid player revives them.
Result:
eliminated = false revival lives restored restriction removed player can join again SMP Sword restored Strength I restored
MAX LIFE:
max-lives = 20
Player = 19
Receives +1:
19 → 20
No Life item.
Player = 20
Receives +1:
20 → 20
Exactly ONE Life Nether Star generated.
MAX LIFE ITEM:
Player = 20
Right-click Life item.
Result:
20 → 20
Item remains.
PLAYER BELOW MAX:
Player = 19
Right-click Life item.
Result:
19 → 20
Exactly ONE item removed.
WITHDRAW:
Player = 20
"/swordsmp withdrawlives 5"
Result:
15 lives 5 Life items
WITHDRAW MINIMUM:
Player = 10
"/swordsmp withdrawlives 9"
Result:
1 life 9 Life items
"/swordsmp withdrawlives 10"
REJECT.
INVENTORY FULL:
Attempt withdrawal with insufficient space.
Result:
No lives removed.
No items lost.
Command rejected safely.
STACKING:
Multiple Life items can exist and remain valid PDC items.
ONLY VALID ITEM:
Normal Nether Star must NOT grant a life.
LIFE ITEM PDC:
Verify PDC is used rather than display name.
KILL DUPLICATION:
One kill at max lives = exactly one Life item.
No duplicate rewards.
RESTART:
Life data remains correct.
Life items remain valid.
Eliminated player remains unable to join.
Revived player can join.
==================================================
- FINAL REQUIREMENT
Modify the existing Sword_Smp plugin implementation.
Do NOT remove existing functionality.
Do NOT create a simplified replacement.
Do NOT break Sharpness VI–X.
Do NOT break Revival Paper.
Do NOT break Fear Event.
Do NOT break Strength I.
Do NOT break Sword protection.
Do NOT break persistent player data.
Implement only the requ
Update elimination, join denial, and revival flows while preserving existing sword and strength restoration.
Add PDC Life items, max-life reward handling, withdrawal command, configuration, and help/tab completion.
Check the completed changes for consistency; build/test tooling is unavailable here.
Elimination now kicks players and denies re-entry by persistent UUID; revival continues through the existing shared
forceRevive/setLivesflows.Next: Life items, overflow rewards, withdrawal, and command/config integration.
Implemented the requested upgrades in the existing plugin:
Elimination and revival: Eliminated players are kicked and denied re-entry using their persistent UUID data; they are no longer switched to another game mode. Admin and Revival Paper revive paths clear the restriction and preserve the existing sword and Strength restoration.
Life items: Added PDC-identified Nether Star Life items, configurable display/settings, max-life overflow rewards, right-click use, and optional actionbar item counts. Kill rewards are protected against duplicate processing.
Withdrawals and commands: Added
/swordsmp withdrawlives <amount>with a default-trueswordsmp.withdrawpermission, minimum-life and inventory-capacity checks, help, and tab suggestions. Adminaddlivesoverflow also produces Life items;setlivesremains capped without creating overflow items.Persistence and configuration: Added Life item settings/messages and persisted deferred overflow rewards for offline players.
No JAR was built, and live Paper server tests were not run here.
Fix this existing plugin issue without changing any other features:
When Player 2 is eliminated/banned by Player 1, the Revival Paper for Player 2 must NOT be placed in Player 2’s inventory.
Instead, the Revival Paper must be given directly to the player who eliminated them (Player 1).
Requirements:
- Player 1 eliminates Player 2 → Revival Paper goes into Player 1’s inventory.
- Player 2 must NOT receive or keep the Revival Paper because they are eliminated and cannot access their inventory.
- Player 1 must be able to freely drop, move, store, or trade the Revival Paper like a normal item.
- The Revival Paper must remain properly linked to Player 2’s UUID using its existing PDC system.
- If Player 1's inventory is full, safely handle the paper (drop it at Player 1's location or use the plugin's existing safe-item handling) so it is never lost.
- Do not change the existing Revival GUI, revival mechanics, Life system, elimination system, or any other plugin features.
- Preserve all existing PDC/duplication protection.
- Only fix the Revival Paper ownership/reward destination described above.
Route kill-triggered paper issuance to the killer while retaining the eliminated player’s UUID in the existing PDC.
Drop any inventory overflow at the killer’s location; never fall back to the eliminated player’s inventory.
Updated the lethal player-kill path so the killer receives the Revival Paper, still linked to the eliminated player’s UUID through the existing PDC. If the killer’s inventory is full, overflow drops at their location. Other elimination paths retain their existing behavior.
Fix these two issues in the existing Sword_Smp plugin without changing any other features:
- Strength I Restriction
Currently the plugin gives Strength I to every player. This is incorrect.
- ONLY the player whose SMP Sword is at Sharpness X (10) should receive Strength I.
- Players with Sharpness I–IX must NOT receive Strength.
- If a player loses/resets from Sharpness X, immediately remove their Strength effect.
- Strength must persist correctly after relog/restart according to their current Sharpness level.
- Real Sharpness VI–X
Sharpness VI, VII, VIII, IX and X must be real enchantment levels, not fake/custom-only names.
When using: "/swordsmp sharpness <player> <6-10>" or "/swordsmp forcelevel <player> <6-10>"
the plugin must:
- Remove the player's previous SMP Sword from their inventory first.
- Give them a new SMP Sword containing the requested real Sharpness VI–X enchantment.
- The sword must still have all existing SMP Sword properties, including its PDC, Unbreakable status, name, and other existing data.
- The displayed enchantment must actually be Sharpness VI, VII, VIII, IX or X.
- The sword must deal the correct real damage for that Sharpness level.
- Do NOT leave the old sword in the inventory and do NOT create duplicates.
- Commands for Sharpness I–V must continue working normally.
- Preserve all existing systems and features; only fix these issues.
Strength restriction: trace effect application, level changes, and relog/restart handling; restrict it to Sharpness X.
Sharpness VI–X: trace sword creation and both command paths; ensure replacing swords preserves existing data and applies real levels.
Strength I is now maintained only while a player’s Sharpness is X. Level changes, resets, deaths, joins, and revival restoration apply or remove the effect accordingly.
SMP Swords now receive their full Sharpness I–X enchantment level. Removed the extra custom damage bonus so Sharpness VI–X damage comes from the real enchantment without being counted twice. Existing command paths continue replacing the marked sword via normalization, which clears duplicates and preserves the sword’s PDC and other generated properties.
Fix these issues in the existing Sword_Smp plugin without changing any other existing features:
- Configurable Sharpness X Effect
Do NOT hard-code Strength I as the Sharpness X effect.
Add a configurable section in "config.yml", for example:
sharpness-x-effect: enabled: true effect: STRENGTH amplifier: 0
Requirements:
- "enabled: true" → Sharpness X player receives the configured effect.
- "enabled: false" → Sharpness X player receives no effect.
- "effect:" allows me to change the effect name from config.
- "amplifier: 0" means Effect Level I, "1" means Level II, etc.
- The effect must only be given to players whose SMP Sword is currently at Sharpness X.
- If the player drops below Sharpness X, immediately remove the configured Sharpness X effect.
- The effect must correctly apply after relog/restart based on the player's current Sharpness level.
- If the configured effect name is invalid, handle it safely without crashing the plugin.
Example:
sharpness-x-effect: enabled: true effect: STRENGTH amplifier: 0
This should allow me to change it later to effects such as "SPEED", "RESISTANCE", etc.
- Real Sharpness VI–X
When using:
"/swordsmp sharpness <player> <6-10>"
or
"/swordsmp forcelevel <player> <6-10>"
the plugin must:
- Remove the player's previous SMP Sword first.
- Give them a new SMP Sword with the requested real Sharpness VI–X enchantment.
- Preserve the SMP Sword PDC, name, Unbreakable status and all existing properties.
- Sharpness VI–X must be actual enchantment levels, not fake lore/custom text.
- The sword must deal the correct real/custom damage corresponding to its Sharpness level.
- Do not leave the old sword behind or create duplicates.
- Existing Sharpness I–V functionality must remain unchanged.
Preserve every other existing plugin system and feature.
Make the Sharpness X effect configurable, safely applied/removed, and restored on join.
Verify Sharpness VI–X sword replacement and damage behavior; adjust only if needed.
Added sharpness-x-effect settings to config.yml. The effect now uses the configured name and amplifier, is applied only at Sharpness X, and is removed when disabled, when the player is eliminated, or when their level drops below X. Invalid effect names are safely ignored. Existing join and periodic maintenance applies the setting after relog or restart.
The Sharpness VI–X command path already replaces marked swords through normalize, which removes duplicates and rebuilds the sword with its PDC and other properties. build applies the requested level as a real Sharpness enchantment; no separate custom damage change was needed.
package com.itzmiikey.swordsmp;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class SwordSmpPlugin extends JavaPlugin {
private ConfigManager configManager;
private DataManager dataManager;
private SwordManager swordManager;
private SharpnessManager sharpnessManager;
private LifeManager lifeManager;
private LifeItemManager lifeItemManager;
private RevivalManager revivalManager;
private PlayerManager playerManager;
private FearManager fearManager;
@Override
public void onEnable() {
saveDefaultConfig();
configManager = new ConfigManager(this);
dataManager = new DataManager(this);
dataManager.load();
swordManager = new SwordManager(this);
sharpnessManager = new SharpnessManager(this);
lifeManager = new LifeManager(this);
lifeItemManager = new LifeItemManager(this);
revivalManager = new RevivalManager(this);
playerManager = new PlayerManager(this);
fearManager = new FearManager(this);
Bukkit.getPluginManager().registerEvents(new CombatManager(this), this);
Bukkit.getPluginManager().registerEvents(playerManager, this);
Bukkit.getPluginManager().registerEvents(revivalManager, this);
Bukkit.getPluginManager().registerEvents(lifeItemManager, this);
Bukkit.getPluginManager().registerEvents(fearManager, this);
CommandManager commands = new CommandManager(this);
getCommand("swordsmp").setExecutor(commands);
getCommand("swordsmp").setTabCompleter(commands);
Bukkit.getScheduler().runTaskTimer(this, playerManager::maintainOnlinePlayers, 20L, 20L);
getLogger().info("Sword_Smp enabled.");
}
@Override
public void onDisable() {
if (dataManager != null) dataManager.saveAll();
}
public ConfigManager getConfigManager() { return configManager; }
public DataManager getDataManager() { return dataManager; }
public SwordManager getSwordManager() { return swordManager; }
public SharpnessManager getSharpnessManager() { return sharpnessManager; }
public LifeManager getLifeManager() { return lifeManager; }
public LifeItemManager getLifeItemManager() { return lifeItemManager; }
public RevivalManager getRevivalManager() { return revivalManager; }
public PlayerManager getPlayerManager() { return playerManager; }
public FearManager getFearManager() { return fearManager; }
}