Zeldaboy111

Skript #276 ]|[ Lobby opruimen

Jan 1st, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.76 KB | None | 0 0
  1. #Read 'license.txt' before using this Skript please
  2.  
  3. options:
  4. config: plugins/Lobby/config.yml
  5.  
  6. #-----------------------------------{ Functions / Startup }-----------------------------------
  7. function startUp():
  8. clear {config.list.interaction::*}
  9. clear {config.list.join::*}
  10. clear {config.list.prefixes::*}
  11. clear {config.list.prefixes.default::*}
  12. add "trapdoor", "armor_stand", "item_frame", "button", "furnace", "chest", "trapped_chest", "crafting_table" and "door" to {config.list.interaction::*}
  13. add "teleportLobby", "clearJoinMessage" and "clearPlayer" to {config.list.join::*}
  14. add "Server.logo", "Server.chatColor", "Server.arcatedColor", "Lobby.logo", "Lobby.chatColor" and "Lobby.arcatedColor" to {config.list.prefixes::*}
  15. add "&e&lServer &7➤", "&f", "&e", "&d&lLobby &7➤", "&f" and "&d" to {config.list.prefixes.default::*}
  16.  
  17. if file "{@config}" doesn't exist:
  18. create file "{@config}"
  19.  
  20. loop {config.list.prefixes::*}:
  21. set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
  22.  
  23. loop {config.list.interaction::*}:
  24. set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
  25.  
  26. loop {config.list.join::*}:
  27. set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
  28.  
  29. set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
  30. set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
  31. set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
  32. set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
  33. set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
  34. set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
  35.  
  36. #logo: %{lobby.arcatedColor.Server}%&lServer &7➤&f
  37. #lobby: %{lobby.arcatedColor.Lobby}%Lobby &7➤&f
  38.  
  39. #set yml value "Lobby.Prefix.Server.logo" of file "{@config}" to "%{lobby.arcatedColor.Server}%&lServer &7➤&f"
  40. #set yml value "Lobby.Prefix.Server.chatColor" of file "{@config}" to "&f"
  41. #set yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Server}%"
  42.  
  43. #set yml value "Lobby.Prefix.Lobby.logo" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%Lobby &7➤&f"
  44. #set yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}" to "&f"
  45. #set yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%"
  46.  
  47. set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
  48. set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
  49. set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Compass"
  50. set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
  51. set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
  52. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
  53. set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
  54. set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
  55. set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
  56.  
  57.  
  58.  
  59.  
  60. else:
  61. set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
  62. set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
  63. set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
  64. set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
  65. set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
  66. set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
  67.  
  68.  
  69. loop {config.list.prefixes::*}:
  70. if yml value "Lobby.Prefix.%loop-value%" of file "{@config}" is not set:
  71. set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
  72.  
  73. loop {config.list.interaction::*}:
  74. if yml value "Lobby.Interaction.%loop-value%" of file "{@config}" is not set:
  75. set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
  76.  
  77. loop {config.list.join::*}:
  78. if yml value "Lobby.Join.%loop-value%" of file "{@config}" is not set:
  79. set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
  80.  
  81.  
  82.  
  83. if yml value "Lobby.Join.Compass.give" of file "{@config}" is not set:
  84. set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
  85. if yml value "Lobby.Join.Compass.item" of file "{@config}" is not set:
  86. set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
  87. if yml value "Lobby.Join.Compass.name" of file "{@config}" is not set:
  88. set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Minigames"
  89. if yml value "Lobby.Join.Compass.lore" of file "{@config}" is not set:
  90. set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
  91. if yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" is not set:
  92. set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
  93. if yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" is not set:
  94. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
  95.  
  96. if yml value "Lobby.Join.teleportLobby" of file "{@config}" is not set:
  97. set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
  98. if yml value "Lobby.Join.Message.clear" of file "{@config}" is not set:
  99. set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
  100. if yml value "Lobby.Join.Message.message" of file "{@config}" is not set:
  101. set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
  102. if yml value "Lobby.Join.clearPlayer" of file "{@config}" is not set:
  103. set yml value "Lobby.Join.clearPlayer" of file "{@config}" to true
  104.  
  105. setupLobby()
  106.  
  107. on enable:
  108. startUp()
  109.  
  110. #-----------------------------------{ Functions / Disable }-----------------------------------
  111.  
  112.  
  113. #-----------------------------------{ Functions / Join and Quit }-----------------------------------
  114. on join:
  115. if {lobby.location} is set:
  116. if {lobby.join.teleportLobby} is true:
  117. wait 2 ticks
  118. teleport player to {lobby.location}
  119. reveal player for all players in world of player
  120. reveal all players in world of player for player
  121.  
  122. if {lobby.join.clearJoinMessage} is true:
  123. set join message to ""
  124. if {lobby.joinMessage} is true:
  125. set {_message} to {lobby.joinMessage}
  126. replace all "[player]" in {_message} with name of player
  127. send "%{_message}%" to all players in world of player
  128.  
  129. if {lobby.join.clearPlayer} is true:
  130. clear player's inventory
  131. set player's level to 0
  132.  
  133. if {lobby.join.giveCompass} is true:
  134. set slot 4 of player to {lobby.items.compass}
  135.  
  136. if {lobby.buildmode.removeLeft.%player%} is set:
  137. delete {lobby.buildmode.removeLeft.%player%}
  138. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby %{lobby.chatColor.Lobby}%because you left."
  139.  
  140. on quit:
  141. if {lobby.buildmode.%player%} is true:
  142. delete {lobby.buildmode.%player%}
  143. set {lobby.buildmode.removeLeft.%player%} to true
  144.  
  145. on disconnect:
  146. if {lobby.buildmode.%player%} is true:
  147. delete {lobby.buildmode.%player%}
  148. set {lobby.buildmode.removeLeft.%player%} to true
  149.  
  150. #-----------------------------------{ Functions / Compass }-----------------------------------
  151. function closeEvent(p: Player, command: Boolean, accept: String):
  152. if {_command} is true:
  153. execute {_p} command {_accept}
  154.  
  155. else:
  156. send "%{_accept}%" to {_p}
  157.  
  158.  
  159. function setupLobby():
  160.  
  161. set {_compassItem} to yml value "Lobby.Join.Compass.item" of file "{@config}"
  162. set {_compassName} to yml value "Lobby.Join.Compass.name" of file "{@config}"
  163. set {_compassLore} to yml value "Lobby.Join.Compass.lore" of file "{@config}"
  164.  
  165. if {_compassItem} parsed as an item type is not set:
  166. send "%{lobby.logo.lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_compassItem}% %{lobby.chatColor.Lobby}%is not an item! Setting the item to a compass..." to console
  167. set {_compassItem} to a compass
  168.  
  169. if {_compassName} is not set:
  170. send "%{lobby.logo.lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%name %{lobby.chatColor.Lobby}%given for the compass!" to console
  171. set {_compassName} to name of {_compassItem}
  172.  
  173. if {_compassLore} is not set:
  174. send "%{lobby.logo.lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%lore %{lobby.chatColor.Lobby}%given for the compass!" to console
  175. set {_compassLore} to ""
  176.  
  177. loop {config.list.interaction::*}:
  178. set {lobby.interaction.%loop-value%} to yml value "Lobby.Interaction.%loop-value%" of file "{@config}"
  179. loop {config.list.join::*}:
  180. set {lobby.join.%loop-value%} to yml value "Lobby.Join.%loop-value%" of file "{@config}"
  181.  
  182.  
  183. set {lobby.items.compass} to ({_compassItem} parsed as an item type) named "%{_compassName}%" with lore "%{_compassLore}%"
  184. set {lobby.items.compass.guiName} to yml value "Lobby.Join.Compass.GUI.name" of file "{@config}"
  185. set {lobby.items.compass.rows} to yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}"
  186. set {lobby.join.joinMessage} to yml value "Lobby.Join.Message.message" of file "{@config}"
  187. set {lobby.join.giveCompass} to yml value "Lobby.Join.Compass.give" of file "{@config}"
  188.  
  189. function createCompassGUI(p: Player, gname: String, rows: Integer, slot1: Integer, slot2: Integer, item1: Item, item2: Item, i1name: String, i2name: String, accept: String, deny: String, command: Boolean):
  190. wait 2 ticks
  191. open chest with {_rows} rows named {_gname} to {_p}
  192. wait 2 ticks
  193.  
  194. set name of {_item1} to {_i1name}
  195. set name of {_item2} to {_i2name}
  196.  
  197. format slot {_slot1} of {_p} with {_item1} to close then run [closeEvent({_p}, {_command}, {_accept})]
  198.  
  199. format slot {_slot2} of {_p} with {_item2} to close then run [send "%{_deny}%" to {_p}]
  200.  
  201.  
  202. function teleportMinigame(p: Player, minigame: String):
  203. if {lobby.minigames.%{_minigame}%} is set:
  204. teleport {_p} to {lobby.minigames.%{_minigame}%.spawn}
  205.  
  206. else:
  207. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Error whilst connecting to %{lobby.arcatedColor.Server}%%{_minigame}%%{lobby.chatColor.Server}%! Please report this error to staff." to {_p}
  208.  
  209. function openCompass(p: Player):
  210. if {lobby.items.compass.rows} is not set:
  211. set {lobby.items.compass.rows} to 3
  212.  
  213. wait 2 ticks
  214. open chest with {lobby.items.compass.rows} rows named "%{lobby.items.compass.guiName}%" to {_p}
  215. wait 2 ticks
  216.  
  217. loop {lobby.minigames.list::*}:
  218. if "%{lobby.minigames.%loop-value%.slot}%" starts with "-":
  219. send "%{lobby.logo.lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%starts with '-'" to console
  220.  
  221. else:
  222. if ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number) is set:
  223. if ("%{lobby.minigames.%loop-value%.item}%" parsed as an item type) is set:
  224. set {_item} to {lobby.minigames.%loop-value%.item}
  225.  
  226. else:
  227. set {_item} to paper
  228.  
  229. set {_slot} to ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number)
  230.  
  231.  
  232. if {lobby.minigames.%loop-value%.name} is set:
  233. if {lobby.minigames.%loop-value%.name} is not "&cNone":
  234. set {_name} to "%{lobby.minigames.%loop-value%.name}%"
  235. replace all "&" in {_name} with "§"
  236. if {lobby.mingames.%loop-value%.lore} is set:
  237. if {lobby.minigames.%loop-value%.lore} is not "&cNone":
  238. set {_lore} to "%{lobby.minigames.%loop-value%.lore}%"
  239. replace all "&" in {_lore} with "§"
  240. format slot {_slot} of {_p} with ("%{lobby.minigames.%loop-value%.item}%" parsed as an item) named "%{_name}%" with lore "%{_lore}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  241. else:
  242. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  243. else:
  244. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  245. else:
  246. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  247. else:
  248. format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
  249. else:
  250. send "%{lobby.logo.lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%is not a number" to console
  251.  
  252. #-----------------------------------{ Player Interaction / Damage / Chat }-----------------------------------
  253. on damage:
  254. if victim is a player:
  255. if world of victim is {lobby.world}:
  256. if damage cause is ("void" parsed as a damage cause):
  257. set victim's health to 0
  258.  
  259. else:
  260. cancel event
  261.  
  262. else:
  263. if world of attacker is {lobby.world}:
  264. if {lobby.buildmode.%attacker%} is not set:
  265. cancel event
  266.  
  267. on death:
  268. if world of player is {lobby.world}:
  269. set death message to ""
  270.  
  271. on respawn:
  272. if world of player is {lobby.world}:
  273. set slot 4 of player to {lobby.items.compass}
  274. teleport player to {lobby.location}
  275.  
  276. on inventory click:
  277. if world of player is {lobby.world}:
  278. if {lobby.buildmode.%player%} is not set:
  279. cancel event
  280.  
  281. on click:
  282. if world of player is {lobby.world}:
  283. if player's held item is {lobby.items.compass}:
  284. cancel event
  285. openCompass(player)
  286.  
  287. on drop:
  288. if world of player is {lobby.world}:
  289. if {lobby.buildmode.%player%} is not set:
  290. cancel event
  291.  
  292. on break:
  293. if world of player is {lobby.world}:
  294. if {lobby.buildmode.%player%} is not set:
  295. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You can't do this!"
  296. cancel event
  297.  
  298.  
  299. on place:
  300. if world of player is {lobby.world}:
  301. if {lobby.buildmode.%player%} is not set:
  302. cancel event
  303.  
  304. on chat:
  305. if world of player is {lobby.world}:
  306. cancel event
  307. wait 1 tick
  308.  
  309. #if {cancelMessage.%player%} is true:
  310. # delete {cancelMessage.%player%}
  311. #
  312. #else:
  313. #Permissions File
  314. set {_prefix} to "&8[%{lobby.arcatedColor.Server}%%player%&8]"
  315. send "%{_prefix}% &7➣ &f%message%" to all players in world of player
  316. send "&8[&6LOBBY&8]&8[%{lobby.arcatedColor.Server}%%player%&8] &7➣ &f%message%" to console
  317.  
  318. on rightclick on trapdoor:
  319. if world of player is {lobby.world}:
  320. if {lobby.interaction.trapdoor} is false:
  321. cancel event
  322.  
  323. on rightclick on door:
  324. if world of player is {lobby.world}:
  325. if {lobby.interaction.door} is false:
  326. if {lobby.buildmode.%player%} is not set:
  327. cancel event
  328.  
  329. on rightclick on item frame:
  330. if world of player is {lobby.world}:
  331. if {lobby.interaction.item_frame} is false:
  332. if {lobby.buildmode.%player%} is not set:
  333. cancel event
  334.  
  335.  
  336.  
  337. on rightclick on button:
  338. if world of player is {lobby.world}:
  339. if {lobby.interaction.button} is false:
  340. if {lobby.buildmode.%player%} is not set:
  341. cancel event
  342.  
  343. on rightclick on armor stand:
  344. if world of player is {lobby.world}:
  345. if {lobby.interaction.armor_stand} is false:
  346. if {lobby.buildmode.%player%} is not set:
  347. cancel event
  348.  
  349. on rightclick on furnace:
  350. if world of player is {lobby.world}:
  351. if {lobby.interaction.button} is false:
  352. if {lobby.buildmode.%player%} is not set:
  353. close player's inventory
  354. cancel event
  355.  
  356. on rightclick on chest:
  357. if world of player is {lobby.world}:
  358. if {lobby.interaction.chest} is false:
  359. if {lobby.buildmode.%player%} is not set:
  360. close player's inventory
  361. cancel event
  362.  
  363. on rightclick on trapped chest:
  364. if world of player is {lobby.world}:
  365. if {lobby.interaction.trapped_chest} is false:
  366. if {lobby.buildmode.%player%} is not set:
  367. close player's inventory
  368. cancel event
  369.  
  370. on rightclick on crafting table:
  371. if world of player is {lobby.world}:
  372. if {lobby.interaction.crafting_table} is false:
  373. if {lobby.buildmode.%player%} is not set:
  374. close player's inventory
  375. cancel event
  376.  
  377. #-----------------------------------{ Lobby Functions / Command }-----------------------------------
  378.  
  379.  
  380. function teleportLobby(p: Player, w: World):
  381. if {lobby.location} is set:
  382.  
  383. if {_w} is {lobby.world}:
  384. teleport {_p} to {lobby.location}
  385.  
  386. else:
  387. teleport {_p} to {lobby.location}
  388. send "World" to console
  389. wait 1 tick
  390. set {_message} to {lobby.joinMessage}
  391. replace "[player]" in {_message} with name of {_p}
  392. send "%{_message}%" to all players in world {lobby.world}
  393. send "&8[&6LOBBY&8]%{_message}%" to console
  394. clear {_p}'s inventory
  395. set slot 4 of {_p} to {lobby.items.compass}
  396.  
  397. else:
  398. send "%{lobby.logo.Server}% %{lobby.chatColor.Server}%The %{lobby.arcatedColor.Server}%lobby %{lobby.chatColor.Server}%is %{lobby.chatColor.Server}%not set%{lobby.chatColor.Lobby}%!" to {_p}
  399.  
  400.  
  401. command /lobby [<text>] [<text>]:
  402. aliases: /hub
  403. trigger:
  404. if executor is player:
  405. if player has permission "lobby.*" or "lobby.set" or "lobby.buildmode" %{lobby.arcatedColor.Lobby}%:
  406. if arg-1 is set:
  407. if arg-1 is "help":
  408. send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
  409. send "<ttp:&7Get the help page><cmd:/lobby help>%{lobby.arcatedColor.Lobby}%/lobby help"
  410. if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.set":
  411. send "<ttp:&7Set the lobby location><sgt:/lobby set>%{lobby.arcatedColor.Lobby}%/lobby set"
  412. if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.buildmode":
  413. send "<ttp:&7Enable/Disable buildmode><sgt:/lobby buildmode enable/disable>%{lobby.arcatedColor.Lobby}%/lobby buildmode enable/disable"
  414.  
  415. send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
  416.  
  417. else if arg-1 is "set":
  418. if player has permission "lobby.*" or "lobby.set":
  419. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%{cmd}% %{lobby.chatColor.Lobby}%to your location!"
  420. set {lobby.world} to "%world of player%"
  421. set {lobby.location} to location of player
  422. else:
  423. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  424.  
  425. else if arg-1 is "buildmode":
  426. if player has permission "lobby.*" or "lobby.buildmode" %{lobby.arcatedColor.Lobby}%:
  427. if world of player is {lobby.world}:
  428. if arg-2 is set:
  429. if arg-2 parsed as a player is set:
  430. if {lobby.buildmode.%arg-2%} is true:
  431. delete {lobby.buildmode.%arg-2%}
  432. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  433. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
  434.  
  435. else:
  436. set {lobby.buildmode.%arg-2%} to true
  437. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  438. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
  439. else:
  440. send "%{lobby.logo.lobby}% %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not online!"
  441.  
  442. else:
  443. if {lobby.buildmode.%player%} is true:
  444. delete {lobby.buildmode.%player%}
  445. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  446.  
  447. else:
  448. set {lobby.buildmode.%player%} to true
  449. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  450.  
  451. else:
  452. set {lobby.buildmode.%player%} to true
  453. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
  454. else:
  455. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  456.  
  457. else:
  458. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%You are %{lobby.arcatedColor.Server}%not %{lobby.chatColor.Server}%in the %{lobby.arcatedColor.Server}%lobby%{lobby.chatColor.Server}%!"
  459. else:
  460. teleportLobby(player, world of player)
  461. else:
  462. teleportLobby(player, world of player)
  463.  
  464. else:
  465. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Only players can execute this command!"
  466.  
  467.  
  468. command /lobbycompass [<text>] [<text>] [<text>]:
  469. aliases: /lcomp, /lcompass, /lobbycomp
  470. trigger:
  471. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create" or "lobby.compass.delete" or "lobby.compass.setspawn" or "lobby.compass.setslot" or "lobby.compass.setname" or "lobby.compass.deletename" or "lobby.compass.setlore" or "lobby.compass.deletelore" or "lobby.compass.setitem" or "lobby.compass.deleteitem" or "lobby.compass.list" or "lobby.compass.setrows" or "lobby.compass.gui" %{lobby.arcatedColor.Lobby}%:
  472. if arg-1 is not set:
  473. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
  474.  
  475. else if arg-1 is "help":
  476. send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
  477. send "<ttp:&7Get the help page><cmd:/lobbycompass help>%{lobby.arcatedColor.Lobby}%/lobbycompass help"
  478. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.create":
  479. send "<ttp:&7Create a minigame><sgt:/lobbycompass create <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass create <minigame>"
  480. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.delete":
  481. send "<ttp:&7Delete a minigame><sgt:/lobbycompass delete <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass delete <minigame>"
  482. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setslot":
  483. send "<ttp:&7Set the slot for a minigame><sgt:/lobbycompass setslot <minigame> <slot>>%{lobby.arcatedColor.Lobby}%/lobbycompass setslot <minigame> <slot>"
  484. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setname":
  485. send "<ttp:&7Set the name for a minigame><sgt:/lobbycompass setname <minigame> <name>>%{lobby.arcatedColor.Lobby}%/lobbycompass setname <minigame> <name>"
  486.  
  487. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.deletename":
  488. send "<ttp:&7Delete the name for a minigame><sgt:/lobbycompass deletename <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletename <minigame>"
  489. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setlore":
  490. send "<ttp:&7Set the lore for a minigame><sgt:/lobbycompass setlore <minigame> <lore>>%{lobby.arcatedColor.Lobby}%/lobbycompass setlore <minigame> <lore>"
  491. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.deletelore":
  492. send "<ttp:&7Delete the lore for a minigame><sgt:/lobbycompass deletelore <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletelore <minigame>"
  493. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setitem":
  494. send "<ttp:&7Set the item for a minigame><sgt:/lobbycompass setitem <minigame> <item>>%{lobby.arcatedColor.Lobby}%/lobbycompass setitem <minigame> <item>"
  495.  
  496. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.deleteitem":
  497. send "<ttp:&7Delete the item for a minigame><sgt:/lobbycompass deleteitem <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deleteitem <minigame>"
  498. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.list":
  499. send "<ttp:&7Get a list from all minigames><sgt:/lobbycompass list>%{lobby.arcatedColor.Lobby}%/lobbycompass list"
  500. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setrows":
  501. send "<ttp:&7Set the amount of rows in the GUI><sgt:/lobbycompass setrows <rows>>%{lobby.arcatedColor.Lobby}%/lobbycompass setrows <rpws>"
  502. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.setspawn":
  503. send "<ttp:&7Set the spawn for a minigame><sgt:/lobbycompass setspawn <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass setspawn <minigame>"
  504.  
  505. if player has permission "op" or "lobby.*" %{lobby.arcatedColor.Lobby}% or "lobby.compass.*" or "lobby.compass.gui":
  506. send "<ttp:&7Open a easy-setup GUI for minigames><sgt:/lobbycompass gui <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass gui <minigame>"
  507.  
  508. #detectPermission(player, "lobbyCompass", "create", true, false, true, "&7Add a minigame to the compass", "", "/lobbycompass create <minigame>", "/lobbycompass create <minigame>")
  509. #detectPermission(player, "lobbyCompass", "delete", true, false, true, "&7Remove a minigame from the compass", "", "/lobbycompass delete <minigame>", "/lobbycompass delete <minigame>")
  510. #detectPermission(player, "lobbyCompass", "setslot", true, false, true, "&7Set the GUI slot for a minigame", "", "/lobbycompass setslot <minigame> <slot>", "/lobbycompass setslot <minigame> <slot>")
  511. #detectPermission(player, "lobbyCompass", "setname", true, false, true, "&7Set the name for a minigame", "", "/lobbycompass setname <minigame> <name>", "/lobbycompass setname <minigame> <name>")
  512.  
  513. #detectPermission(player, "lobbyCompass", "deletename", true, false, true, "&7Delete the name for a minigame", "", "/lobbycompass deletename <minigame>", "/lobbycompass deletename <minigame>")
  514. #detectPermission(player, "lobbyCompass", "setlore", true, false, true, "&7Set the lore for a minigame", "", "/lobbycompass setlore <minigame> <lore>", "/lobbycompass setlore <minigame> <lore>")
  515. #detectPermission(player, "lobbyCompass", "deletelore", true, false, true, "&7Delete the lore for a minigame", "", "/lobbycompass deletelore <minigame>", "/lobbycompass deletelore <minigame>")
  516. #detectPermission(player, "lobbyCompass", "setitem", true, false, true, "&7Set the item for a minigame", "", "/lobbycompass setitem <minigame> <item>", "/lobbycompass setitem <minigame> <item>")
  517.  
  518. #detectPermission(player, "lobbyCompass", "deleteitem", true, false, true, "&7Delete the item for a minigame", "", "/lobbycompass deleteitem <minigame>", "/lobbycompass deleteitem <minigame>")
  519. #detectPermission(player, "lobbyCompass", "list", true, true, false, "&7Get a list from all minigames", "/lobbycompass list", "", "/lobbycompass list")
  520. #detectPermission(player, "lobbyCompass", "setrows", true, false, true, "&7Set the amount of rows in the GUI", "", "/lobbycompass setrows <rows>", "/lobbycompass setrows <rows>")
  521. #detectPermission(player, "lobbyCompass", "gui", true, false, true, "&7Open a easy-setup GUI for minigames", "", "/lobbycompass gui <minigame>", "/lobbycompass gui <minigame>")
  522. send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
  523.  
  524. else if arg-1 is "create":
  525. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create" %{lobby.arcatedColor.Lobby}%:
  526. if arg-2 is set:
  527. if {lobby.minigames.%arg-2%} is not set:
  528. set {lobby.minigames.%arg-2%} to true
  529. set {lobby.minigames.%arg-2%.name} to "&cNone"
  530. set {lobby.minigames.%arg-2%.lore} to "&cNone"
  531. set {lobby.minigames.%arg-2%.item} to "&cNone"
  532. set {lobby.minigames.%arg-2%.slot} to "&cNone"
  533. set {lobby.minigames.%arg-2%.spawn} to location of player
  534. add arg-2 to {lobby.minigames.list::*}
  535.  
  536. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully made the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  537.  
  538. else:
  539. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%already exists!"
  540. else:
  541. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  542. else:
  543. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  544.  
  545. else if arg-1 is "delete" or "remove":
  546. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.delete" %{lobby.arcatedColor.Lobby}%:
  547. if arg-2 is set:
  548. if {lobby.minigames.%arg-2%} is set:
  549. delete {lobby.minigames.%arg-2%}
  550. delete {lobby.mninigames.%arg-2%.name}
  551. delete {lobby.mninigames.%arg-2%.lore}
  552. delete {lobby.mninigames.%arg-2%.item}
  553. delete {lobby.mninigames.%arg-2%.slot}
  554. delete {lobby.mninigames.%arg-2%.spawn}
  555. remove arg-2 from {lobby.minigames.list::*}
  556.  
  557. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully removed the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  558. else:
  559. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  560. else:
  561. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  562. else:
  563. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  564.  
  565. else if arg-1 is "setspawn":
  566. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawn" %{lobby.arcatedColor.Lobby}%:
  567. if arg-2 is set:
  568. if {lobby.minigames.%arg-2%} is set:
  569. set {lobby.minigames.%arg-2%.spawn} to location of player
  570. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the spawn of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%at %{lobby.arcatedColor.Lobby}%%location of player%%{lobby.chatColor.Lobby}%!"
  571.  
  572. else:
  573. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  574. else:
  575. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
  576. else:
  577. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  578.  
  579. else if arg-1 is "setslot":
  580. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setslot" %{lobby.arcatedColor.Lobby}%:
  581. if arg-2 is set:
  582. if {lobby.minigames.%arg-2%} is set:
  583. if arg-3 is set:
  584. if (arg-3 parsed as a number) is set:
  585. if {lobby.items.compass.rows} is not set:
  586. set {lobby.items.compass.rows} to 1
  587.  
  588. else if {lobby.items.compass.rows} < 1:
  589. set {lobby.items.compass.rows} to 1
  590.  
  591. if {lobby.items.compass.rows}*9-1 <= arg-3 parsed as a number:
  592. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The amount %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is to big! The slot number has to be between %{lobby.arcatedColor.Lobby}%0 %{lobby.chatColor.Lobby}%and %{lobby.arcatedColor.Lobby}%%{lobby.items.compass.rows}*9-1%%{lobby.chatColor.Lobby}%."
  593.  
  594. else:
  595. loop {lobby.minigames.list::*}:
  596. if {lobby.minigames.%loop-value%.slot} is arg-3:
  597. set {_set} to loop-value
  598. stop loop
  599.  
  600. if {_set} is set:
  601. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The slot %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is already in use by the minigame %{lobby.arcatedColor.Lobby}%%{_set}%%{lobby.chatColor.Lobby}%!"
  602.  
  603. else:
  604. set {lobby.minigames.%arg-2%.slot} to arg-3 parsed as a number
  605. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the slot of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  606. else:
  607. send "%{lobby.logo.lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not a number!"
  608. else:
  609. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-2% <slot>%{lobby.chatColor.Lobby}%."
  610. else:
  611. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  612. else:
  613. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% slot <minigame> <slot>%{lobby.chatColor.Lobby}%."
  614. else:
  615. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  616.  
  617. else if arg-1 is "setname":
  618. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setname" %{lobby.arcatedColor.Lobby}%:
  619. if arg-2 is set:
  620. if {lobby.minigames.%arg-2%} is set:
  621. if arg-3 is set:
  622. set {lobby.minigames.%arg-2%.name} to arg-3
  623. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  624.  
  625. else:
  626. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname %arg-2% <name>%{lobby.chatColor.Lobby}%."
  627. else:
  628. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  629. else:
  630. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname <minigame> <name>%{lobby.chatColor.Lobby}%."
  631. else:
  632. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  633.  
  634. else if arg-1 is "deletename" or "delname":
  635. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletename" %{lobby.arcatedColor.Lobby}%:
  636. if arg-2 is set:
  637. if {lobby.minigames.%arg-2%} is set:
  638. set {lobby.minigames.%arg-2%.name} to "&cNone"
  639. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  640.  
  641. else:
  642. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  643. else:
  644. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  645.  
  646. else:
  647. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  648.  
  649.  
  650. else if arg-1 is "setlore":
  651. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setlore" %{lobby.arcatedColor.Lobby}%:
  652. if arg-2 is set:
  653. if {lobby.minigames.%arg-2%} is set:
  654. if arg-3 is set:
  655. set {lobby.minigames.%arg-2%.lore} to arg-3
  656. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  657.  
  658. else:
  659. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Currect usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore %arg-2% <lore>%{lobby.chatColor.Lobby}%."
  660. else:
  661. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  662. else:
  663. send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore <minigame> <lore>%{lobby.chatColor.Lobby}%."
  664.  
  665. else:
  666. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  667.  
  668. else if arg-1 is "deletelore" or "dellore":
  669. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletelore" %{lobby.arcatedColor.Lobby}%:
  670. if arg-2 is set:
  671. if {lobby.minigames.%arg-2%} is set:
  672. set {lobby.minigames.%arg-2%.lore} to "&cNone"
  673. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  674.  
  675. else:
  676. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  677. else:
  678. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  679.  
  680. else:
  681. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  682.  
  683.  
  684. else if arg-1 is "setitem":
  685. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setitem" %{lobby.arcatedColor.Lobby}%:
  686. if arg-2 is set:
  687. if {lobby.minigames.%arg-2%} is set:
  688. if arg-3 is set:
  689. if arg-3 parsed as an item is set:
  690. set {lobby.minigames.%arg-2%.item} to arg-3 parsed as an item type
  691. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
  692.  
  693. else:
  694. send "%{lobby.logo.lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not an item!"
  695. else:
  696. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem %arg-2% <item>%{lobby.chatColor.Lobby}%."
  697. else:
  698. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  699. else:
  700. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem <minigame> <item>%{lobby.chatColor.Lobby}%."
  701. else:
  702. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  703.  
  704. else if arg-1 is "deleteitem" or "delitem":
  705. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deleteitem" %{lobby.arcatedColor.Lobby}%:
  706. if arg-2 is set:
  707. if {lobby.minigames.%arg-2%} is set:
  708. set {lobby.minigames.%arg-2%.item} to "&cNone"
  709. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  710.  
  711. else:
  712. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  713. else:
  714. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
  715.  
  716. else:
  717. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  718.  
  719.  
  720. else if arg-1 is "list":
  721. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.list" %{lobby.arcatedColor.Lobby}%:
  722. if {lobby.minigames.list::*} is not empty:
  723. loop {lobby.minigames.list::*}:
  724. if {_list} is set:
  725. set {_list} to "%{_list}%%{lobby.chatColor.Lobby}%, %{lobby.arcatedColor.Lobby}%%loop-value%"
  726. else:
  727. set {_list} to "%loop-value%"
  728.  
  729. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%This is the list of all the minigames:" and "%{lobby.arcatedColor.Lobby}%%{_list}%"
  730. else:
  731. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%There are no minigames added yet."
  732. else:
  733. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  734.  
  735.  
  736. else if arg-1 is "setrows":
  737. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows" %{lobby.arcatedColor.Lobby}%:
  738. if arg-2 is set:
  739. if arg-2 parsed as a number is set:
  740. if arg-2 parsed as a number < 7:
  741. set {lobby.items.compass.rows} to arg-2 parsed as a number
  742. set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to arg-2 parsed as a number
  743. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Succesfully set the amount of rows to %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
  744.  
  745. else:
  746. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The maximum amount of rows is %{lobby.arcatedColor.Lobby}%6%{lobby.chatColor.Lobby}%!"
  747. else:
  748. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%%{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not a number!"
  749. else:
  750. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setrows <rows>%{lobby.chatColor.Lobby}%."
  751. else:
  752. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  753.  
  754. else if arg-1 is "gui":
  755. if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.gui" %{lobby.arcatedColor.Lobby}%:
  756. if arg-2 is set:
  757. if {lobby.minigames.%arg-2%} is set:
  758. wait 2 ticks
  759. open chest with 2 rows named "&8Config GUI" to player
  760. wait 2 ticks
  761. set {_item} to "book"
  762. set {_name} to {lobby.minigames.%arg-2%.name}
  763. set {_lore} to {lobby.minigames.%arg-2%.lore}
  764.  
  765. replace all "&" in {_name} with "§"
  766. replace all "&" in {_lore} with "§"
  767.  
  768. if ({lobby.minigames.%arg-2%.item} parsed as an item type) is set:
  769. if ({lobby.minigames.%arg-2%.item} parsed as an item type) is not air:
  770. set {_item} to {lobby.minigames.%arg-2%.item}
  771.  
  772. format slot 2 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Minigame: %{lobby.arcatedColor.Lobby}%%arg-2%" to be unstealable
  773. format slot 3 of player with name tag named "%{lobby.chatColor.Lobby}%Name: %{lobby.arcatedColor.Lobby}%%{_name}%" to close then run [createCompassGUI(player, "&8Name %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Click <sgt:/lcomp setname %arg-2% [naam]>%{lobby.arcatedColor.Lobby}%here%{lobby.chatColor.Lobby}% to edit the name.", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other name.", false)]
  774. format slot 4 of player with paper named "%{lobby.chatColor.Lobby}%Lore" with lore {_lore} to close then run [createCompassGUI(player, "&8Lore %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Click <sgt:/lcomp setlore %arg-2% [lore]>%{lobby.arcatedColor.Lobby}%here%{lobby.chatColor.Lobby}% to edit the lore.", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other lore.", false)]
  775. format slot 5 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Item: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.item}%" to close then run [createCompassGUI(player, "&8Item %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Click <sgt:/lcompass setitem %arg-2% [item]>%{lobby.arcatedColor.Lobby}%here%{lobby.chatColor.Lobby}% to edit the item.", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other item.", false)]
  776. format slot 6 of player with clock named "%{lobby.chatColor.Lobby}%Slot: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.slot}%" to close then run [createCompassGUI(player, "&8Slot %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.lobby}% Click <sgt:/lcompass setslot %arg-2% [slot]>%{lobby.arcatedColor.Lobby}%here%{lobby.chatColor.Lobby}% to edit the slot.", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other slot.", false)]
  777.  
  778. format slot 12 of player with redstone torch named "%{lobby.chatColor.Lobby}%Spawn: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.spawn}%" to close then run [createCompassGUI(player, "&8Spawn %arg-2%", 3, 12, 14, green wool, red wool, "&aSet", "&cDeny", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Click <cmd:/lcompass setspawn %arg-2%>%{lobby.arcatedColor.Lobby}%here%{lobby.chatColor.Lobby}% to set the spawn.", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other spawn.", false)]
  779. format slot 13 of player with barrier named "&cClose menu" to close
  780. format slot 14 of player with redstone named "&4Delete" to close then run [createCompassGUI(player, "&8Delete %arg-2%", 3, 12, 14, green wool, red wool, "&aDelete", "&cDeny", "/lcompass delete %arg-2%", "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You have chosen to not delete the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%.", true)]
  781.  
  782. else:
  783. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
  784. else:
  785. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% gui <minigame>%{lobby.chatColor.Lobby}%."
  786.  
  787. else:
  788. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
  789.  
  790. else:
  791. send "%{lobby.logo.lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
  792.  
  793.  
  794. #-----------------------------------{ Other }-----------------------------------
  795. function sendPluginList(p: Player):
  796. set {_list::*} to list of plugins
  797. set {_count} to 0
  798. loop {_list::*}:
  799. add 1 to {_count}
  800. if {_list} is set:
  801. set {_list} to "%{_list}%%{lobby.chatColor.Server}%, %{lobby.arcatedColor.Server}%%loop-value%"
  802. else:
  803. set {_list} to "%{lobby.arcatedColor.Server}%%loop-value%"
  804.  
  805. send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Total Plugins: %{lobby.arcatedColor.Server}%%{_count}%%nl%%{lobby.chatColor.Server}%%{_list}%" to {_p}
  806.  
  807.  
  808. on command:
  809. command ends with "plugins":
  810. cancel event
  811. if player has permission "op":
  812. sendPluginList(player)
  813.  
  814. command ends with "pl":
  815. cancel event
  816. if player has permission "op":
  817. sendPluginList(player)
  818.  
  819. command is "spawn":
  820. if world of player is not "Zingdom-World" and "Zingdom1-Nether" and "Zingdom1-End":
  821. cancel event
  822. if world of player is {lobby.world}:
  823. teleport player to {lobby.location}
  824.  
  825. command is "hub":
  826. teleport player to {lobby.location}
  827.  
  828. else:
  829. set {cmd} to command in lower case
Add Comment
Please, Sign In to add comment