Compatibility
Minecraft: Java Edition
Platforms
Links
Creators
Details
- Overview
SetImmortal is a Paper plugin for Minecraft Java 1.21.10 that allows operators or console to grant or remove an immortal status for any username. Immortal players still appear to take damage normally (animation, sound, knockback, fire, etc.) but never lose health. The system works even if the player is offline because usernames are stored instead of active player objects.
- Commands
/setimmortal <username> — Adds a player to the immortal list
/removeimmortal <username> — Removes a player from the immortal list
Rules:
Only OP or console can use commands
Duplicate entries are prevented
Works for offline players
- How It Works
The plugin listens to damage events. When a player takes damage:
Check if entity is a player
Check if username is in immortal list
If yes → set damage to 0 (do not cancel event)
This preserves all visual and physical effects while preventing health loss.
- Storage System
File automatically generated:
plugins/SetImmortal/players.yml
Format:
immortals:
- PlayerName
Rules:
Loads safely if missing
Saves instantly after changes
Never deletes other entries accidentally
- Damage Protection Coverage
Health loss is prevented from all damage sources, including:
PvP, mobs, fall damage, fire/lava, explosions, magic, suffocation, custom plugin damage
- Permissions
Allowed:
Server console
Operators
Denied:
All non-OP players
(No permission plugin required.)
- Stability Requirements
The plugin must not crash if:
data file missing
file empty
player offline
invalid username
server reload
command typo
- Plugin.yml Requirements
Must include:
name
main class
version
api-version
commands list
- Code Standards
clean class structure
null-safe checks
no deprecated API
no NMS usage
uses plugin data folder API
safe file handling
- Expandability Design
Architecture should allow easy future additions such as:
immortallist command
clear command
UUID support
permission nodes
temporary immortality
world-specific immortality


