About
呼び出し元 毎tick実行するコマンド群3
観光モードの提案から、変更までの処理を行う。
コマンド群
コマンド群A
位置 (-1920,8,-188)
No. | コマンド | 状態 |
---|---|---|
1 | /scoreboard players test Sightseeing Settings 1 * | |
2 | /tellraw @a[tag=SuggestSightseeing] {“text”:”既に観光モードに移行済みです。”} | 条件付き |
3 | /scoreboard players test Sightseeing Settings * 0 | |
4 | /execute @a[tag=SuggestSightseeing,c=1] ~ ~ ~ /execute 0-0-1-0-1 ~-1 9 -188 /fill ~ ~ ~ ~ ~ ~ minecraft:redstone_block 0 replace minecraft:lapis_block 0 ###観光モード提案タイマー起動 ###executeは提案tick鯖落ち時等誤承認回避 | 条件付き |
5 | /execute @a[tag=SuggestSightseeing] ~ ~ ~ /me によって観光モードへの移行が提案されました。 | 条件付き |
6 | /scoreboard players tag @a add ShowVote | 条件付き |
7 | /scoreboard players set #SSModeVoteSec Global 61 | 条件付き |
8 | /list | 条件付き |
9 | /scoreboard players set #SSModeVoteSec Global 181 | 条件付き |
10 | /scoreboard players tag @a[tag=SuggestSightseeing] remove SuggestSightseeing |
コマンド群B
位置 (-1920,9,-188)
No. | コマンド | 状態 |
---|---|---|
1 | /scoreboard players add #SSModeVoteTimer Global 1 | リピート |
2 | /tellraw @a[tag=ShowVote] [{“text”:””},{“text”:”観光モードへの移行が提案されています。\n”,”bold”:true,”color”:”gold”},{“text”:”観光モードに移行すると次のようになります。\n・死んでもアイテムがなくならない\n・プレイヤー名が緑色になる\n・島攻略時にクリアタイムが表示されない\n”},{“text”:”一度移行すると、戻すことはできません!\n”,”color”:”red”,”bold”:true},{“text”:”クリックで”},{“text”:”提案を拒否する”,”underlined”:true,”color”:”yellow”,”clickEvent”:{“action”:”run_command”,”value”:”/trigger DenySightSeeing set 1”}}] | |
3 | /scoreboard players enable @a[tag=ShowVote] DenySightSeeing | 条件付き |
4 | /scoreboard players tag @a[tag=ShowVote] remove ShowVote | 条件付き |
5 | /execute @a[score_DenySightSeeing_min=1,c=1] ~ ~ ~ /scoreboard players reset #SSModeVoteSec Global | |
6 | /tellraw @a {“text”:”観光モード移行の提案は否決されました。”,”color”:”yellow”,”bold”:true} | 条件付き |
7 | /scoreboard players reset @a[score_DenySightSeeing_min=1] DenySightSeeing | 条件付き |
8 | /fill -1921 ~ ~ -1921 ~ ~ minecraft:lapis_block 0 replace minecraft:redstone_block 0 ###観光モード提案タイマー停止 | 条件付き |
9 | /scoreboard players test #SSModeVoteTimer Global 20 * | |
10 | /scoreboard players set #SSModeVoteTimer Global 0 | 条件付き |
11 | /execute @a ~ ~ ~ /playsound block.comparator.click master @a[c=1] ~ ~ ~ 0.25 1.782 0 | 条件付き |
12 | /clone -1920 ~1 ~ -1920 ~1 ~ -1920 ~1 ~ filtered force minecraft:command_block 5 ###観光モード提案時間経過 | 条件付き |
コマンド群C
位置 (-1920,10,-188)
No. | コマンド | 状態 |
---|---|---|
1 | /scoreboard players remove #SSModeVoteSec Global 1 | |
2 | /scoreboard players test #SSModeVoteSec Global 180 180 | |
3 | /tellraw @a {“text”:”観光モード移行まであと3分”} | 条件付き |
4 | /scoreboard players test #SSModeVoteSec Global 60 60 | |
5 | /tellraw @a {“text”:”観光モード移行まであと1分”} | 条件付き |
6 | /scoreboard players test #SSModeVoteSec Global 30 30 | |
7 | /tellraw @a {“text”:”観光モード移行まであと30秒”} | 条件付き |
8 | /scoreboard players test #SSModeVoteSec Global 10 10 | |
9 | /tellraw @a {“text”:”観光モード移行まであと10秒”} | 条件付き |
10 | /scoreboard players test #SSModeVoteSec Global 1 5 | |
11 | /tellraw @a {“translate”:”観光モード移行まであと%1$s秒”,”with”:[{“score”:{“name”:”#SSModeVoteSec”,”objective”:”Global”}}]} | 条件付き |
12 | /scoreboard players test #SSModeVoteSec Global * 0 | |
13 | /fill -1921 ~-1 ~ -1921 ~-1 ~ minecraft:lapis_block 0 replace minecraft:redstone_block 0 ###観光モード提案タイマー停止 | 条件付き |
14 | /scoreboard players test #SSModeVoteSec Global 0 0 | 条件付き |
15 | /tellraw @a {“text”:”観光モードに移行しました。”,”color”:”green”,”bold”:true} | 条件付き |
16 | /scoreboard teams option FriendlyTeam color green | 条件付き |
17 | /gamerule keepInventory true | 条件付き |
18 | /execute @a ~ ~ ~ /playsound entity.firework.twinkle master @a[c=1] ~ ~ ~ 1 1.19 0 | 条件付き |
19 | /scoreboard players set Sightseeing Settings 1 | 条件付き |
詳細
コマンド群A詳細
Sightseeing
のSettings
が1以上であるとき、SuggestSightseeing
を持っているすべてのプレイヤーに「既に観光モードに移行済みです。」とのメッセージを表示Sightseeing
のSettings
が0以下であるとき、SuggestSightseeing
を持つプレイヤーを一人選択し、(-1921,9,-188)にあるラピスラズリブロックをレッドストーンブロックに置き換え、コマンド群Bをリピート実行し、以下の事柄を実行SuggestSightseeing
を持つすべてのプレイヤーに観光モードへの移行が提案されたとのメッセージを表示- すべてのプレイヤーに
ShowVote
を付与 #SSModeVoteSec
のGlobal
を61に設定- プレイヤーリストを表示
#SSModeVoteSec
のGlobal
を181に設定
SuggestSightseeing
を持つすべてのプレイヤーからSuggestSughtseeing
を削除
コマンド群B詳細
#SSModeVoteTimer
のGlobal
に1を足すShowVote
を持つすべてのプレイヤーに観光モードへの移行が提案されているというメッセージを表示し、以下の事柄を実行DenySightSeeing
への書き込みを許可ShowVote
を削除
DenySightSeeing
が1以上であるプレイヤーを一人選択し、#SSModeVoteSec
のGlobal
を0に設定し、以下の事柄を実行- すべてのプレイヤーに「観光モード移行の提案は否決されました。」とのメッセージを表示
DenySightSeeing
が1以上であるすべてのプレイヤーのDenySightSeeing
を0に設定- (-1921,9,-188)にあるレッドストーンブロックをラピスラズリブロックに置き換え、コマンド群Bのクロックを停止
##SSModeVoteTimer
のGlobal
が20以上であるとき、以下の事柄を実行- 一人のプレイヤーを選択し、効果音を鳴らす
- (-1920,10,-188)にあるコマンド群Cを実行
コマンド群C詳細
#SSModeVoteSec
のGlobal
から1を引く#SSModeVoteSec
のGlobal
の値に対応したメッセージを表示(以下参照)#SSModeVoteSec
のGlobal
が0以下であるとき、以下の事柄を実行- (-1921,9,-188)にあるラピスラズリブロックをレッドストーンブロックに置き換え、コマンド群Bを停止
#SSModeVoteSec
が0であるとき、「観光モードに移行しました。」とのメッセージを表示し、以下の事柄を実行FriendlyTeam
の色を緑に変更keepInventory
をtrueに変更- プレイヤーの座標で効果音を鳴らす
Sightseeing
のSettings
を1に設定
#SSModeVoteSecの値とメッセージ
#SSModeVoteSec | メッセージ |
---|---|
180 | 観光モード移行まであと3分 |
60 | 観光モード移行まであと1分 |
30 | 観光モード移行まであと30秒 |
10 | 観光モード移行まであと10秒 |
1~5 | 観光モード移行まであとn秒 |