spawnProtection
Download the raw spawnProtection.ser file
Uses: GiveEffect · Hint · ChangedRole · OnEvent
Complete script
spawnProtection.ser
# Disabled by default: remove # from the filename to enable this script.
# Short spawn protection
# Replaces a basic spawn-protection plugin.
# Change 5s and the effect intensity to match your server balance.
!-- OnEvent ChangedRole
-- require @evPlayer $evNewRole
# Spectators and unassigned players do not need protection.
if $evNewRole is "Spectator" or $evNewRole is "None"
stop
end
GiveEffect @evPlayer DamageReduction 5s 255
Hint @evPlayer 5s "<color=#73ff73>Spawn protection active for 5 seconds.</color>"
This file is compiled during the SER build and is safe to use as a current-syntax learning example.