Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /tpa [<player>]:
- trigger:
- if arg 1 is set:
- if {%player%.lastTPA} is set:
- set {_diff} to difference between {%player%.lastTPA} and now
- if {_diff} is less than 60 seconds:
- send "&aYou have sent a teleportation request to &r%arg 1's display name%&a." to player
- send "&r%player's display name% &ewants to teleport to you." to arg 1
- send "&eType &f/tpaccept &eto accept the teleportation request." to arg 1
- send "&eType &f/tpdeny &eto accept the teleportation request." to arg 1
- set {%arg 1%.tpa} to player
- wait 60 seconds
- if {%arg 1%.tpa} is not false:
- message "&cYour teleportation request was cancelled because &r%arg 1's display name% &ctook too long to accept." to player
- set {%arg 1%.tpa} to false
- set {%player%.lastTPA} to now
- else:
- send "&cPlease wait &f%difference between {%player%.lastTPA} and now% &cbefore sending another teleportation request." to player
- else:
- send "&aYou have sent a teleportation request to &r%arg 1's display name%&a." to player
- send "&r%player's display name% &ewants to teleport to you." to arg 1
- send "&eType &f/tpaccept &eto accept the teleportation request." to arg 1
- send "&eType &f/tpdeny &eto accept the teleportation request." to arg 1
- set {%arg 1%.tpa} to player
- wait 60 seconds
- if {%arg 1%.tpa} is not false:
- message "&cYour teleportation request was cancelled because &r%arg 1's display name% &ctook too long to accept." to player
- set {%arg 1%.tpa} to false
- set {%player%.lastTPA} to now
- else:
- send "&cUsage: /tpa <player>" to player
- command /tpaccept:
- trigger:
- if {%player%.tpa} is not false:
- teleport player to {%player%.tpa}
- play "ENDERMAN_TELEPORT" to player at volume 1
- send "&eYou were teleported to &r%{%player%.tpa}'s display name%&e." to player
- send "&r%player's display name% &aaccepted your teleportation request." to {%player%.tpa}
- set {%player%.tpa} to false
- else:
- send "&cYou don't have any teleportation requests." to player
- command /tpdeny:
- trigger:
- if {%player%.tpa} is not false:
- send "&cYou have denied &f%{%player%.tpa}'s display name%&c's teleportation request." to player
- send "&r%player's display name% &cdenied your teleportation requst." to {%player%.tpa}
- else:
- send "&cYou don't have any teleportation requests." to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement