Join Protection
Whoever joins the server for the very first time knows neither the spawn nor the rules and is the easiest prey for spawn campers. The join protection gives new players a grace period (default 5 minutes) in which they take no damage. A boss bar at the top of the screen counts the time down.
How it works #
- Starts automatically on a player's first join. There is no command and no permission.
- During the grace period every kind of damage is stopped (
all: falls, mobs, lava, players) or only damage dealt by other players (pvp: melee, arrows and projectiles, thrown potions and potion clouds, lit TNT, end crystals and tamed animals of other players). Only falling into the void and/killstill work. - If the newcomer attacks a player (also with an arrow, potion, TNT, crystal or pet), the protection ends at once (default) or the attack is blocked (
end-on-attack: false). Blocked hits do not start a combat tag in the claim module. - Relogging within the window keeps the remaining time (
resume-on-rejoin). After a server restart nobody gets a new window. - The boss bar shows the text from
messages.(yml joinprotection.) with the time left asbossbar m:ss; colour and style are configurable.
Tip: The claim module has a short fresh-spawn immunity after every respawn (PvP., 10 seconds). The roles are separate: the join protection for the very first visit, the fresh-spawn immunity for every death afterwards. If a newcomer dies while the join protection still runs, with mode: all only its bar stays visible; with mode: pvp the fresh-spawn immunity joins in, because it also keeps mobs away.
Configuration (modules/joinprotection.yml) #
YAML
# Enables or disables the join protection.
enabled: true
joinprotection:
# How long the protection lasts, in seconds (default 5 minutes).
duration-seconds: 300
# all = no damage at all (falls, mobs, lava, other players),
# pvp = only damage dealt by other players is stopped.
mode: all
# true = the protection ends as soon as the newcomer attacks another
# player, false = the newcomer cannot attack players while protected.
end-on-attack: true
# Keeps the remaining time when the player relogs within the window.
resume-on-rejoin: true
bossbar:
# PINK, BLUE, RED, GREEN, YELLOW, PURPLE or WHITE.
color: GREEN
# PROGRESS, NOTCHED_6, NOTCHED_10, NOTCHED_12 or NOTCHED_20.
style: PROGRESSComplete example config #
YAML
enabled: true
joinprotection:
duration-seconds: 600
mode: pvp
end-on-attack: true
resume-on-rejoin: true
bossbar:
color: YELLOW
style: NOTCHED_10