7mm

【Skript】ListingCommands

7mm
Feb 8th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. command /cmdlist:
  2. aliases: /cl
  3. trigger:
  4. true is true
  5.  
  6. command /cmdlistedit [<text>] [<text>] [<text>] [<text>] [<text>]:
  7. aliases: /cle
  8. trigger:
  9. if arg 1 is "genre":
  10. if arg 2 is "add":
  11. arg 3 is set
  12. if {cmdlist::%arg 3%} is true:
  13. message "&c同IDのジャンルが既に存在します"
  14. stop
  15. message "&a新しくジャンルを作成しました &9(Genre ID: %arg 3%)"
  16. set {cmdlist::%arg 3%} to true
  17. set {cmdlist::%arg 3%::name} to arg 3
  18. set {cmdlist::%arg 3%::icon} to command block
  19. set {cmdlist::%arg 3%::show} to false
  20. if arg 2 is "rename":
  21. arg 3 is set
  22. arg 4 is set
  23. if {cmdlist::%arg 3%} is not set:
  24. message "&c存在しないジャンルです"
  25. stop
  26. message "&aジャンル名を変更しました &9(Genre ID: %arg 3%)"
  27. set {cmdlist::%arg 3%::name} to arg 4
  28. if arg 2 is "icon":
  29. arg 3 is set
  30. arg 4 is set
  31. if {cmdlist::%arg 3%} is not set:
  32. message "&c存在しないジャンルです"
  33. stop
  34. set {_icon} to arg 4 parsed as item
  35. if {_icon} is not set:
  36. message "&cアイテムIDが無効です"
  37. stop
  38. message "&aジャンルアイコンを変更しました &9(Genre ID: %arg 3%)"
  39. set {cmdlist::%arg 3%::icon} to {_icon}
  40. if arg 2 is "show":
  41. arg 3 is set
  42. if {cmdlist::%arg 3%} is not set:
  43. message "&c存在しないジャンルです"
  44. stop
  45. message "&aジャンルを表示に設定しました &9(Genre ID: %arg 3%)"
  46. set {cmdlist::%arg 3%::show} to true
  47. if arg 2 is "hide":
  48. arg 3 is set
  49. if {cmdlist::%arg 3%} is not set:
  50. message "&c存在しないジャンルです"
  51. stop
  52. message "&aジャンルを非表示に設定しました &9(Genre ID: %arg 3%)"
  53. set {cmdlist::%arg 3%::show} to false
  54. if arg 2 is "remove":
  55. arg 3 is set
  56. if {cmdlist::%arg 3%} is not set:
  57. message "&c存在しないジャンルです"
  58. stop
  59. message "&aジャンルを削除しました &9(Genre ID: %arg 3%)"
  60. clear {cmdlist::%arg 3%::*}
  61. clear {cmdlist::%arg 3%}
Advertisement
Add Comment
Please, Sign In to add comment