Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. command /tpa [<player>]:
  2. trigger:
  3. if arg 1 is set:
  4. if {%player%.lastTPA} is set:
  5. set {_diff} to difference between {%player%.lastTPA} and now
  6. if {_diff} is less than 60 seconds:
  7. send "&aYou have sent a teleportation request to &r%arg 1's display name%&a." to player
  8. send "&r%player's display name% &ewants to teleport to you." to arg 1
  9. send "&eType &f/tpaccept &eto accept the teleportation request." to arg 1
  10. send "&eType &f/tpdeny &eto accept the teleportation request." to arg 1
  11. set {%arg 1%.tpa} to player
  12. wait 60 seconds
  13. if {%arg 1%.tpa} is not false:
  14. message "&cYour teleportation request was cancelled because &r%arg 1's display name% &ctook too long to accept." to player
  15. set {%arg 1%.tpa} to false
  16. set {%player%.lastTPA} to now
  17. else:
  18. send "&cPlease wait &f%difference between {%player%.lastTPA} and now% &cbefore sending another teleportation request." to player
  19. else:
  20. send "&aYou have sent a teleportation request to &r%arg 1's display name%&a." to player
  21. send "&r%player's display name% &ewants to teleport to you." to arg 1
  22. send "&eType &f/tpaccept &eto accept the teleportation request." to arg 1
  23. send "&eType &f/tpdeny &eto accept the teleportation request." to arg 1
  24. set {%arg 1%.tpa} to player
  25. wait 60 seconds
  26. if {%arg 1%.tpa} is not false:
  27. message "&cYour teleportation request was cancelled because &r%arg 1's display name% &ctook too long to accept." to player
  28. set {%arg 1%.tpa} to false
  29. set {%player%.lastTPA} to now
  30. else:
  31. send "&cUsage: /tpa <player>" to player
  32.  
  33. command /tpaccept:
  34. trigger:
  35. if {%player%.tpa} is not false:
  36. teleport player to {%player%.tpa}
  37. play "ENDERMAN_TELEPORT" to player at volume 1
  38. send "&eYou were teleported to &r%{%player%.tpa}'s display name%&e." to player
  39. send "&r%player's display name% &aaccepted your teleportation request." to {%player%.tpa}
  40. set {%player%.tpa} to false
  41. else:
  42. send "&cYou don't have any teleportation requests." to player
  43.  
  44. command /tpdeny:
  45. trigger:
  46. if {%player%.tpa} is not false:
  47. send "&cYou have denied &f%{%player%.tpa}'s display name%&c's teleportation request." to player
  48. send "&r%player's display name% &cdenied your teleportation requst." to {%player%.tpa}
  49. else:
  50. send "&cYou don't have any teleportation requests." to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement