# /scoreboard コマンドの使い方と書き方（マイクラ統合版）

- URL: https://maikurabu.jp/tech/command/scoreboard/
- 対象の版: 統合版

> /scoreboard は、点数（スコア）を記録します。ゲーム作りで、得点や回数を数えるのに使います。

## 書き方
- `/scoreboard objectives add <名前> dummy [表示名]`
- `/scoreboard objectives setdisplay <sidebar|list|belowname> [名前]`
- `/scoreboard players add <対象> <名前> <数>`
- `/scoreboard players set <対象> <名前> <数>`
- `/scoreboard players remove <対象> <名前> <数>`
- `/scoreboard players reset <対象> [名前]`
- `/scoreboard players operation <対象> <名前> <計算> <相手> <相手の名前>`

## 各部分の意味
- dummy: コマンドでだけ点数が変わる種類
- sidebar: 画面の右に点数を出す
- 計算: += -= *= /= %= = < > ><（入れかえ）

## 例
- `/scoreboard objectives add point dummy 得点` 「得点」のスコアを作る
- `/scoreboard objectives setdisplay sidebar point` 画面の右に出す
- `/scoreboard players add @s point 1` 自分に1点
- `/execute if score @s point matches 10.. run say ゴール！` 10点以上ならメッセージ

- 変数（数をしまっておく箱）と同じ考え方です。

## 出典
- マイクラ部の編集資料

---
マイクラ部は、MojangおよびMicrosoftとは関係のない非公式のファンサイトです。NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.