Advertisement
fleft17

Untitled

Jul 28th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. else if arg 1 is equal to "color":
  2. if command sender does not have the permission "teams.color":
  3. message "{@P} &ePermission denied. &a(missing ""teams.color"")"
  4. else if arg 2 is set:
  5. message "{@P} {@IS}"
  6. else if {Teams::*} is not set:
  7. message "{@P} No teams to color!"
  8. else if (size of {Teams::*}) is bigger than 40:
  9. message "{@P} Too many teams to color!"
  10. else:
  11. if (size of {Teams::*}) is smaller than 16:
  12. set {_Colors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  13. else if (size of {Teams::*}) is smaller than 20:
  14. set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline" and "yellow"
  15. else if (size of {Teams::*}) is equal to 20:
  16. set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline", "white" and "yellow"
  17. else:
  18. set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline", "white", and "yellow"
  19. set {_Other.Colors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  20. set {_Format.Codes::*} to "bold", "italic", "strikethrough", and "underline"
  21. loop {Teams::*}:
  22. if loop-value is less than or equal to 21:
  23. set {_Color} to (random element out of {_Colors::*})
  24. remove {_Color} from {_Colors::*}
  25. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  26. replace all "_" with " " in {_Color}
  27. loop {Team.%loop-value%::*}:
  28. message "{@P} Your Team color is <%{_Color}%>%{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
  29. else:
  30. delete {_Colors::*}
  31. set {_Color} to (random element out of {_Other.Colors::*})
  32. set {_Format} to (random element out of {_Format.Codes::*})
  33. remove {_Color} from {_Other.Colors::*}
  34. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  35. replace all "_" with " " in {_Color}
  36. loop {Team.%loop-value%::*}:
  37. message "{@P} Your Team color is <%{_Color}%><%{_Format}%>%{_Format}% %{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
  38. execute console command "/%{_Format}% UHC%loop-value%"
  39.  
  40. message "{@P} Colored all teams"
  41. loop all players:
  42. loop-player has the permission "teams.color.notify"
  43. loop-player is not command sender
  44. message "{@P} {@N} Colored all teams" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement