command /sethome:
description: Set your home
executable by: players
trigger:
set {homes.%player%.location} to location of player
message "Set your home to <grey>%location of player%<reset>"
command /home:
description: Teleport yourself to your home
executable by: players
trigger:
if {homes.%player%.location} is not set:
message "You have not set your home yet!"
stop trigger
teleport player to {homes.%player%.location}
on load:
delete {request::*}
command /tpa [<offline player>]:
trigger:
set {_p} to arg-1
set {_u} to uuid of arg-1
if {_p} is online:
if {_p} is not player:
if {request::player::%{_u}%} is set:
send "&cThis player already has a active teleportation request, please wait!" to player
stop
send "&2%player% &ahas requested to teleport to you! &7&o(/tpaccept to accept, automatically expires in 30 seconds)" to {_p}
send "&aYou have requested to teleport to &2%{_p}%&a! &7&o(This will automatically expire in 30 seconds)" to player
set {request::player::%{_u}%} to player
wait 30 seconds
if {request::player::%{_u}%} is set:
delete {request::player::%{_u}%}
send "&CYour teleportation request to %{_p}% &chas expired!" to player
send "&cYour teleportation request from %player% &chas expired!" to {_p}
else:
send "&cYou can't tpa to yourself!" to player
else:
send "&cThe specified player is currently offline!" to player
command /tpaccept:
trigger:
set {_u} to uuid of player
if {request::player::%{_u}%} is set:
set {_p} to {request::player::%{_u}%}
if {_p} is online:
teleport {_p} to location of player
send "&aYour teleportation request to %player% &ahas been accepted!" to {_p}
send "&aYou have accepted the teleportation request from %{_p}%" to player
delete {request::player::%{_u}%}
else:
send "&cThis player is no longer online!"
else:
send "&cYou have no teleportation requests to accept!" to player
on command "/home":
set {back.%player%} to location of player
on command "/tpa":
set {back.%player%} to location of player
on death:
set {back.%victim%} to location of player
command /back:
trigger:
teleport player to {back.%player%}