Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #_/_/_/_/_/_/_/_/_/_/_/#
- # #
- # Custom Sound #
- # #
- #_/_/_/_/_/_/_/_/_/_/_/#
- #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
- #========#
- # 設定 #
- #========#
- options:
- サウンド設定メニュータイトル: &9Custom Sound
- チャット音: ENTITY_ITEM_PICKUP
- チャット音ピッチ: 5
- ログイン音: BLOCK_NOTE_PLING
- ログイン音ピッチ: 5
- ログアウト音: BLOCK_NOTE_BASS
- ログアウト音ピッチ: 5
- コマンド実行音: ENTITY_ITEM_PICKUP
- コマンド実行音ピッチ: 5
- #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
- #音は下のURLから種類を選んでコピペで貼り付けてください
- #https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
- #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
- #========#
- # コード #
- #========#
- variables:
- {%player%sound-chat} = "on"
- {%player%sound-login} = "on"
- {%player%sound-logout} = "on"
- {%player%sound-command} = "on"
- command /customsound:
- aliases: csound, customs
- trigger:
- open virtual chest inventory with size 1 named "{@サウンド設定メニュータイトル}" to player
- wait a tick
- set {%player%sound-set-menu} to 1
- format gui slot 0 of player with green music disc named "&6&l全ての音を&a&lON" to run console command "set-sound %player% allon"
- format gui slot 1 of player with chirp music disc named "&6&l全ての音を&c&lOFF" to run console command "set-sound %player% alloff"
- if {%player%sound-chat} is "on":
- 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"
- if {%player%sound-chat} is "off":
- 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"
- if {%player%sound-login} is "on":
- 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"
- if {%player%sound-login} is "off":
- 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"
- if {%player%sound-logout} is "on":
- 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"
- if {%player%sound-logout} is "off":
- 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"
- if {%player%sound-command} is "on":
- 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"
- if {%player%sound-command} is "off":
- 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"
- command /set-sound <player> <text>:
- executable by: console
- trigger:
- if arg 2 is "allon":
- set {%arg 1%sound-chat} to "on"
- set {%arg 1%sound-login} to "on"
- set {%arg 1%sound-logout} to "on"
- set {%arg 1%sound-command} to "on"
- else if arg 2 is "alloff":
- set {%arg 1%sound-chat} to "off"
- set {%arg 1%sound-login} to "off"
- set {%arg 1%sound-logout} to "off"
- set {%arg 1%sound-command} to "off"
- else if arg 2 is "chat":
- if {%arg 1%sound-chat} is "on":
- set {%arg 1%sound-chat} to "off"
- else if {%arg 1%sound-chat} is "off":
- set {%arg 1%sound-chat} to "on"
- else if arg 2 is "login":
- if {%arg 1%sound-login} is "on":
- set {%arg 1%sound-login} to "off"
- else if {%arg 1%sound-login} is "off":
- set {%arg 1%sound-login} to "on"
- else if arg 2 is "logout":
- if {%arg 1%sound-logout} is "on":
- set {%arg 1%sound-logout} to "off"
- else if {%arg 1%sound-logout} is "off":
- set {%arg 1%sound-logout} to "on"
- else if arg 2 is "command":
- if {%arg 1%sound-command} is "on":
- set {%arg 1%sound-command} to "off"
- else if {%arg 1%sound-command} is "off":
- set {%arg 1%sound-command} to "on"
- execute arg 1 command "customsound"
- on chat:
- loop all players:
- if {%loop-player%sound-chat} is "on":
- play sound "{@チャット音}" to loop-player with volume 1 and pitch {@チャット音ピッチ}
- on join:
- loop all players:
- if {%loop-player%sound-login} is "on":
- play sound "{@ログイン音}" to loop-player with volume 1 and pitch {@ログイン音ピッチ}
- on quit:
- loop all players:
- if {%loop-player%sound-logout} is "on":
- play sound "{@ログアウト音}" to loop-player with volume 1 and pitch {@ログアウト音ピッチ}
- on command:
- if command sender is console:
- stop
- else:
- if {%player%sound-command} is "on":
- if command is "customsound" or "csound" or "customs":
- stop
- else:
- play sound "{@コマンド実行音}" to player with volume 1 and pitch {@コマンド実行音ピッチ}
- on inventory click:
- if {%player%sound-set-menu} is 1:
- cancel event
- on inventory close:
- set {%player%sound-set-menu} to 0
Add Comment
Please, Sign In to add comment