Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.21 KB | None | 0 0
  1. #_/_/_/_/_/_/_/_/_/_/_/#
  2. # #
  3. # Custom Sound #
  4. # #
  5. #_/_/_/_/_/_/_/_/_/_/_/#
  6. #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  7. #========#
  8. # 設定 #
  9. #========#
  10. options:
  11. サウンド設定メニュータイトル: &9Custom Sound
  12. チャット音: ENTITY_ITEM_PICKUP
  13. チャット音ピッチ: 5
  14. ログイン音: BLOCK_NOTE_PLING
  15. ログイン音ピッチ: 5
  16. ログアウト音: BLOCK_NOTE_BASS
  17. ログアウト音ピッチ: 5
  18. コマンド実行音: ENTITY_ITEM_PICKUP
  19. コマンド実行音ピッチ: 5
  20.  
  21. #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  22. #音は下のURLから種類を選んでコピペで貼り付けてください
  23. #https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
  24. #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  25.  
  26. #========#
  27. # コード #
  28. #========#
  29. variables:
  30. {%player%sound-chat} = "on"
  31. {%player%sound-login} = "on"
  32. {%player%sound-logout} = "on"
  33. {%player%sound-command} = "on"
  34.  
  35. command /customsound:
  36. aliases: csound, customs
  37. trigger:
  38. open virtual chest inventory with size 1 named "{@サウンド設定メニュータイトル}" to player
  39. wait a tick
  40. set {%player%sound-set-menu} to 1
  41. format gui slot 0 of player with green music disc named "&6&l全ての音を&a&lON" to run console command "set-sound %player% allon"
  42. format gui slot 1 of player with chirp music disc named "&6&l全ての音を&c&lOFF" to run console command "set-sound %player% alloff"
  43. if {%player%sound-chat} is "on":
  44. format gui slot 3 of player with redstone_torch_on named "&a&lチャット" with lore "&fチャット時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% chat"
  45. if {%player%sound-chat} is "off":
  46. format gui slot 3 of player with hidden enchant lever named "&6&lチャット" with lore "&fチャット時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% chat"
  47. if {%player%sound-login} is "on":
  48. format gui slot 4 of player with redstone_torch_on named "&6&lログイン" with lore "&fログイン時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% login"
  49. if {%player%sound-login} is "off":
  50. format gui slot 4 of player with hidden enchant lever named "&6&lログイン" with lore "&fログイン時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% login"
  51. if {%player%sound-logout} is "on":
  52. format gui slot 5 of player with redstone_torch_on named "&6&lログアウト" with lore "&fログアウト時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% logout"
  53. if {%player%sound-logout} is "off":
  54. format gui slot 5 of player with hidden enchant lever named "&6&lログアウト" with lore "&fログアウト時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% logout"
  55. if {%player%sound-command} is "on":
  56. format gui slot 6 of player with redstone_torch_on named "&6&lコマンド実行" with lore "&fコマンド実行時の音||&e>>> &a&lON &e<<<" to run console command "set-sound %player% command"
  57. if {%player%sound-command} is "off":
  58. format gui slot 6 of player with hidden enchant lever named "&6&lコマンド実行" with lore "&fコマンド実行時の音||&e>>> &c&lOFF &e<<<" to run console command "set-sound %player% command"
  59.  
  60. command /set-sound <player> <text>:
  61. executable by: console
  62. trigger:
  63. if arg 2 is "allon":
  64. set {%arg 1%sound-chat} to "on"
  65. set {%arg 1%sound-login} to "on"
  66. set {%arg 1%sound-logout} to "on"
  67. set {%arg 1%sound-command} to "on"
  68. else if arg 2 is "alloff":
  69. set {%arg 1%sound-chat} to "off"
  70. set {%arg 1%sound-login} to "off"
  71. set {%arg 1%sound-logout} to "off"
  72. set {%arg 1%sound-command} to "off"
  73. else if arg 2 is "chat":
  74. if {%arg 1%sound-chat} is "on":
  75. set {%arg 1%sound-chat} to "off"
  76. else if {%arg 1%sound-chat} is "off":
  77. set {%arg 1%sound-chat} to "on"
  78. else if arg 2 is "login":
  79. if {%arg 1%sound-login} is "on":
  80. set {%arg 1%sound-login} to "off"
  81. else if {%arg 1%sound-login} is "off":
  82. set {%arg 1%sound-login} to "on"
  83. else if arg 2 is "logout":
  84. if {%arg 1%sound-logout} is "on":
  85. set {%arg 1%sound-logout} to "off"
  86. else if {%arg 1%sound-logout} is "off":
  87. set {%arg 1%sound-logout} to "on"
  88. else if arg 2 is "command":
  89. if {%arg 1%sound-command} is "on":
  90. set {%arg 1%sound-command} to "off"
  91. else if {%arg 1%sound-command} is "off":
  92. set {%arg 1%sound-command} to "on"
  93. execute arg 1 command "customsound"
  94.  
  95. on chat:
  96. loop all players:
  97. if {%loop-player%sound-chat} is "on":
  98. play sound "{@チャット音}" to loop-player with volume 1 and pitch {@チャット音ピッチ}
  99.  
  100. on join:
  101. loop all players:
  102. if {%loop-player%sound-login} is "on":
  103. play sound "{@ログイン音}" to loop-player with volume 1 and pitch {@ログイン音ピッチ}
  104.  
  105. on quit:
  106. loop all players:
  107. if {%loop-player%sound-logout} is "on":
  108. play sound "{@ログアウト音}" to loop-player with volume 1 and pitch {@ログアウト音ピッチ}
  109.  
  110. on command:
  111. if command sender is console:
  112. stop
  113. else:
  114. if {%player%sound-command} is "on":
  115. if command is "customsound" or "csound" or "customs":
  116. stop
  117. else:
  118. play sound "{@コマンド実行音}" to player with volume 1 and pitch {@コマンド実行音ピッチ}
  119.  
  120. on inventory click:
  121. if {%player%sound-set-menu} is 1:
  122. cancel event
  123.  
  124. on inventory close:
  125. set {%player%sound-set-menu} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement