Here's a skript that @BrettPlayMC requested.
Will probably be updated later on (Feel free to update it if you wish! )
Will probably be updated later on (Feel free to update it if you wish! )
Code:
options:
tpaprefix: &8[&4WorldTPA&8]
command_tpa_permission: teleporter.world.survival
command_tpaccept_permission: teleporter.world.survival.accept
on join:
if {timeout.%player%} is not set:
set {timeout.%player%} to "120"
if {requested.%player%} is not set:
set {requested.%player%} to false
command /tpa [<player>]:
permission: {@command_tpa_permission}
usage: /tpa [<player>]
trigger:
if player's world is "Survival":
if arg 1 is set:
if arg 1's world is "Survival":
set {requested.%player%} to true
message "{@tpaprefix} &7Requesting to &c%arg 1% &7for tpa." to player
message "{@tpaprefix} &c%player% &7has requested to teleport to you" to arg 1
message "{@tpaprefix} &7The request will time out in &c%{timeout.%player%}% seconds" to arg 1
wait 120 seconds
if {accepted.%player%} is true:
set {accepted.%player%} to false
set {requested.%player%} to false
else:
message "{@tpaprefix} &7Correct Usage: &c/tpa [<player>]"
command /tpaccept [<player>]:
permission: {@command_tpaccept_permission}
usage: /tpaccept [<player>]
trigger:
if player's world is "Survival":
if arg 1 is set:
if arg 1's world is "Survival":
if {requested.%arg 1%} is true:
set {requested.%arg 1%} to false
message "{@tpaprefix} &7TPA Request accepted! &c(Wait 5 seconds, moving will disable it. Any movement. Stay still for 5 seconds.)" to arg 1
wait 5 seconds
if {moved.%arg 1%} is true:
message "{@tpaprefix} &7TPA canceled due to &cmovements" to arg 1
stop
else:
teleport arg 1 to player
set {accepted.%player%} to true
else:
message "{@tpaprefix} &7Correct Usage: &c/tpaccept [<player>]"
on walking on dirt, or stone, or cobblestone, or grass, or sand, or obsidian:
set {moved.%player%} to true
wait 5 seconds
set {moved.%player%} to false