HonestlyDex

Spawn Source Code

Mar 17th, 2021
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2. #Teleport players to spawn whenever they join
  3. TPJoin: false
  4. #Announce the new players when they join for the first time
  5. FirstJoin: true
  6. #Hide join Messages
  7. JoinMessage: true
  8. #Hide quit Messages
  9. QuitMessage: true
  10.  
  11. command /setspawn:
  12. aliases: spawnset, sethub, hubset, setlobby, lobbyset
  13. permission: spawn.setspawn
  14. permission message: &cSorry, but you don't have permission to execute this command!
  15. description: Set spawn at your location.
  16. trigger:
  17. message "&6You have &cset spawn&6 at your location!"
  18. set {spawn} to location of player
  19.  
  20. command /spawn [<player>]:
  21. aliases: hub, lobby
  22. permission: spawn.spawn
  23. permission message: &cSorry, but you don't have permission to execute this command!
  24. description: Teleport you to spawn.
  25. trigger:
  26. if {spawn} isn't set:
  27. message "&4Error:&c spawn is not set!"
  28. stop
  29. else:
  30. argument 1 is not set:
  31. teleport player to {spawn}
  32. message "&6Teleporting..."
  33. else:
  34. if sender has permission "spawn.spawn.others":
  35. if argument is online:
  36. teleport argument to {spawn}
  37. if sender is a player:
  38. message "&6You have been teleported to spawn by &c%player%&6." to argument 1
  39. if sender is not a player:
  40. message "&6You have been teleported to spawn by &cConsole&6." to argument 1
  41. teleport player to {spawn}
  42. else:
  43. message "&cSorry, but you don't have permission to execute this command!"
  44.  
  45. command /delspawn:
  46. permission: spawn.spawn.delete
  47. permission message: &cSorry, but you don't have permission to execute this command!
  48. description: Unset spawn location.
  49. trigger:
  50. delete {spawn}
  51. message "&6You have successfully unset &cspawn6!"
  52.  
  53.  
  54. on first join:
  55. teleport player to {spawn}
  56. if {@FirstJoin} is true:
  57. broadcast "&dPlease welcome player &9%player's display name% &dhe/she have joined the server for the first time."
  58. else:
  59. stop
  60.  
  61. on join:
  62. if {@JoinMessage} is true:
  63. set join message to ""
  64. stop
  65. else:
  66. stop
  67. if {spawn} is set:
  68. if {@TPJoin} is true:
  69. teleport player to {spawn}
  70. else:
  71. stop
  72. else:
  73. stop
  74.  
  75. on quit:
  76. if {@QuitMessage} is true:
  77. set leave message to ""
  78. stop
  79. else:
  80. stop
RAW Paste Data