# NOTE: Due to the small border recommendation for 3rd Life, we also recommend the following plugins: # Multiverse and Multiverse-NetherPortals # This will allow you to set the Nether travel scale to 1:1 rather than the default 1:8 in Multiverse's worlds.yml file. options: # set an integer # use commands to enable/disable the world border (off until turned on the first time) border-diameter: 750 # permission node for resetting all of the data for this script. adminperms: thirdlife.admin # ie. tl will set the command to /tl or thirdlife will set the command to /thirdlife command: thirdlife # spawnpoint setup; disabled by default # use of spawn-protection in server.properties is recommended if using this setting. # set false if you have another plugin handling respawns. spawn-enabled: false spawn-x: -0.5 spawn-y: 67 spawn-z: -0.5 # so you can see those lovely Minecraft faces ;) disable-helmets: true on load: if {@spawn-enabled} is true: set {_x} to round({@spawn-x})-1 set {_y} to round({@spawn-y}) set {_z} to round({@spawn-z})-1 execute console command "spawnpoint @a %{_x}% %{_y}% %{_z}%" on join: # adds player to a list of all players who have joined the server. if {players::*} does not contain player's uuid: add player's uuid to {players::*} # teleport player to spawnpoint on first join, if spawn-enabled is set to true if {@spawn-enabled} is true: teleport player to location({@spawn-x}, {@spawn-y}, {@spawn-z}) # set player's lives to 3 on first join if {lives.%player's uuid%} is not set: set {lives.%player's uuid%} to 3 if {lives.%player's uuid%} is 3: # set player to survival set player's gamemode to survival # green team check if {greenteam::*} does not contain player's uuid: add player's uuid to {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # set player to green team execute console command "team join tl.green %player%" # tells the player how many lives they have wait 20 ticks send "&bYou have &a3 lives&b remaining. Good luck!" to player else if {lives.%player's uuid%} is 2: # set player to survival set player's gamemode to survival # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} does not contain player's uuid: add player's uuid to {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # set player to yellow team execute console command "team join tl.yellow %player%" # tells the player how many lives they have wait 20 ticks send "&bYou have &e2 lives&b remaining. Good luck!" to player else if {lives.%player's uuid%} is 1: # set player survival set player's gamemode to survival # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} does not contain player's uuid: add player's uuid to {redteam::*} # set player to red team execute console command "team join tl.red %player%" # tells the player how many lives they have wait 20 ticks send "&bYou have &c1 life&b remaining. Happy hunting!" to player else if {lives.%player's uuid%} is 0: # set player spectator set player's gamemode to spectator # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # set player to gray team execute console command "team join tl.gray %player%" # tells the player how many lives they have send "&aYou are &cout of lives&b! Activating spectator mode..." to player on death: # remove hearts from death messages set {_deathmsg} to the death message replace every "♥ " with "" in {_deathmsg} replace every "♡ " with "" in {_deathmsg} replace every "♥" with "" in {_deathmsg} replace every "♡" with "" in {_deathmsg} set the death message to {_deathmsg} # subtract 1 life from the player upon death if {lives.%player's uuid%} is greater than 0: subtract 1 from {lives.%player's uuid%} if {lives.%player's uuid%} is 2: wait 1 tick loop all players: if loop-player is not player: send "&b%player% is down to &e2 lives&b!" to loop-player else if {lives.%player's uuid%} is 1: wait 1 tick loop all players: if loop-player is not player: send "&b%player% is down to &c1 life&b Watch your back!" to loop-player else if {lives.%player's uuid%} is 0: wait 1 tick loop all players: if loop-player is not player: send "&b%player% has died 3 times and is out!" to loop-player on respawn: if {lives.%player's uuid%} is 3: # set player survival set player's gamemode to survival # green team check if {greenteam::*} does not contain player's uuid: add player's uuid to {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # tells the player how many lives they have send "&bYou have &a3 lives&b remaining. Good luck!" to player # set player to green team wait 1 tick execute console command "team join tl.green %player%" else if {lives.%player's uuid%} is 2: # set player survival set player's gamemode to survival # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} does not contain player's uuid: add player's uuid to {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # tells the player how many lives they have send "&bYou have &e2 lives&b remaining. Good luck!" to player # set player to yellow team wait 1 tick execute console command "team join tl.yellow %player%" else if {lives.%player's uuid%} is 1: # set player survival set player's gamemode to survival # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} does not contain player's uuid: add player's uuid to {redteam::*} # tells the player how many lives they have send "&bYou have &c1 life&b remaining. Happy hunting!" to player # set player to red team wait 1 tick execute console command "team join tl.red %player%" else if {lives.%player's uuid%} is 0: # green team check if {greenteam::*} contains player's uuid: remove player's uuid from {greenteam::*} # yellow team check if {yellowteam::*} contains player's uuid: remove player's uuid from {yellowteam::*} # red team check if {redteam::*} contains player's uuid: remove player's uuid from {redteam::*} # tells the player how many lives they have send "&aYou are &cout of lives&b! Activating spectator mode..." to player # set player to gray team wait 1 tick execute console command "team join tl.gray %player%" # set player spectator set player's gamemode to spectator on damage of a player: if attacker is a player: if {greenteam::*} contains attacker's uuid: if {greenteam::*} contains victim's uuid: cancel event else if {yellowteam::*} contains victim's uuid: cancel event else if {yellowteam::*} contains attacker's uuid: if {yellowteam::*} contains victim's uuid: cancel event else if {greenteam::*} contains victim's uuid: cancel event # disable helmet equip if helmets are disabled (set in options at the top) on player change armor: if {@disable-helmets} is true: if event-itemtype is any helmet: delete helmet slot of player give player 1 of event-item send "&6Helmets are disallowed during this session." to player #on right-click with any helmet: # cancel event #on inventory click: # if event-slot is 39: # cancel event on tab complete of "/{@command}": set tab completions for position 1 to "teams", "border", and "reset" if tab arg-1 = "teams": set tab completions for position 2 to "setup" and "reset" else if tab arg-1 = "border": set tab completions for position 2 to "on" and "off" command /{@command} [] []: permission: {@adminperms} trigger: if arg 1 is "reset": loop {players::*}: delete {lives.%loop-value%} delete {players::*} delete {greenteam::*} delete {yellowteam::*} delete {redteam::*} loop all players: execute console command "team join tl.green %loop-player%" add loop-player's uuid to {greenteam::*} set {lives.%loop-player's uuid%} to 3 if {@spawn-enabled} is true: teleport loop-player to location({@spawn-x}, {@spawn-y}, {@spawn-z}) set loop-player's gamemode to survival else if arg 1 is "teams": if arg 2 is "setup": send "&6Teams have been set up. please use &b/{@command} reset&6 to reset this script's saved variables. This will set everyone back to 3 lives and is not reversible." to player execute console command "team add tl.green" execute console command "team add tl.yellow" execute console command "team add tl.red" execute console command "team add tl.gray" execute console command "team modify tl.green color green" execute console command "team modify tl.yellow color yellow" execute console command "team modify tl.red color red" execute console command "team modify tl.gray color gray" execute console command "team modify tl.green suffix {""text"":"" ♥♥♥""}" execute console command "team modify tl.yellow suffix {""text"":"" ♥♥♡""}" execute console command "team modify tl.red suffix {""text"":"" ♥♡♡""}" execute console command "team modify tl.gray suffix {""text"":"" ♡♡♡""}" execute console command "team modify tl.green seeFriendlyInvisibles false" execute console command "team modify tl.yellow seeFriendlyInvisibles false" execute console command "team modify tl.red seeFriendlyInvisibles false" else if arg 2 is "reset": send "&6Teams have been reset. Please use &b/{@command} teams setup&6 to set up the teams." to player execute console command "team remove tl.green" execute console command "team remove tl.yellow" execute console command "team remove tl.red" execute console command "team remove tl.gray" else if arg 1 is "border": if arg 2 is "on": execute console command "execute in minecraft:overworld run worldborder center 0 0" execute console command "execute in minecraft:overworld run worldborder set {@border-diameter}" execute console command "execute in minecraft:overworld run worldborder damage amount 0" execute console command "execute in minecraft:the_nether run worldborder center 0 0" execute console command "execute in minecraft:the_nether run worldborder set {@border-diameter}" execute console command "execute in minecraft:the_nether run worldborder damage amount 0" execute console command "execute in minecraft:the_end run worldborder center 0 0" execute console command "execute in minecraft:the_end run worldborder set {@border-diameter}" execute console command "execute in minecraft:the_end run worldborder damage amount 0" else if arg 2 is "off": execute console command "execute in minecraft:overworld run worldborder set 60000000" execute console command "execute in minecraft:the_nether run worldborder set 60000000" execute console command "execute in minecraft:the_end run worldborder set 60000000" else: send formatted "%nl%&6Command Usage:%nl%&c&oAll commands cannot be undone.%nl%&b/{@command} reset&6 - Resets all saved data for the 3rd Life script.%nl%&b/{@command} teams &f<&breset&f|&bsetup&f>&6 - Resets/sets up teams.%nl%&b/{@command} border &f<&bon&f|&boff&f>&6 - Turns the the World Border on or off. Change radius in &bthirdlife.sk&6." to player