Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Advertisement
Ic translate
此條目的(部分)內容需要翻譯。

你可以幫助我們來翻譯此條目,但請勿使用機器翻譯

計分板(scoreboard)系統是一套複雜的遊戲機制。通常可以由命令命令方塊進行控制。

對象

對象由名稱 (name)顯示名稱(display name)判據(criteria)以及每位玩家所對應的整數數據組成。分數的範圍為-2,147,483,648至2,147,483,647沒有小數。

對象的名稱用於在命令中進行引用,目標參數以及在檔案格式中使用。這一變數區分大小寫並且只能為單一單詞。

與之相反,顯示名稱可以由很多個單詞組成,用於在不同場合進行顯示。也是區分大小寫的。

對象的判據決定了其行為:

判據 描述 可否編輯
dummy(虛擬變數) 只能透過命令修改分數,諸如死亡等遊戲行為並不能修改分數。這可以被用來製作事件的標記、映射和通貨。
trigger(觸發器) 只能透過命令修改分數,諸如死亡等遊戲行為並不能修改分數。 一個使用trigger做判據的對象可以被玩家利用命令/trigger來設定/增加/減少。如果/trigger命令沒有對玩家啟用,則使用/trigger命令會失敗,並且成功使用過一次此命令後該命令將重新被關閉。值得注意的是/trigger命令可以在作弊被關閉的情況下被非管理員的普通玩家使用。這可以比較方便的透過/tellraw來使用。
deathCount(死亡次數) 當玩家死亡時,分數會自動增加。
playerKillCount(殺人數量) 當玩家殺死其他玩家時分數會自動增加。
totalKillCount(殺怪數量) 當玩家殺死其他生物時分數會自動增加。
health(生命值) 普通玩家會在0~20之間。代表玩家擁有紅心數量的兩倍。在玩家第一次改變血量前會顯示為0。額外的血或者傷害吸收的血也會計算在血量中,也就是説當獲得了傷害吸收或者生命值提升的烽火台效果後生命值可以超過20..

在預覽版13w36a中,數百個判據被加入了,[1]這些判據使用了統計和成就系統來形成一個混合判據。[2]不同於上面的簡單判據,混合判據有多個部分,使用英文句號來分隔(".")。例如 "stat.entityKilledBy.Zombie"是一種混合判據,當玩家被喪屍殺死的時候才會增加。[3]

下面是已知的混合判據:

判據本名 描述 可否編輯 分判據數量
achievement(成就) 可用分判據如下: "acquireIron", "bakeCake", "blazeRod", "bookcase", "breedCow", "buildBetterPickaxe", "buildFurnace", "buildHoe", "buildPickaxe", "buildSword", "buildWorkBench", "cookFish", "diamonds", "diamondsToYou", "enchantments", "exploreAllBiomes", "flyPig", "fullBeacon", "ghast", "killCow", "killEnemy", "killWither", "makeBread", "mineWood", "onARail", "openInventory", "overkill", "overpowered", "portal", "potion", "snipeSkeleton", "spawnWither", "theEnd", and "theEnd2". 數量取決於玩家獲得此成就的次數(例如,當一個玩家撿起3塊木塊,他的"achievement.mineWood"判據會變成3) 34
stat(統計) 基於玩家的統計來計數,接受的分判據有: "animalsBred", "boatOneCm", "climbOneCm", "crouchOneCm", "damageDealt", "damageTaken", "deaths", "diveOneCm", "drop", "fallOneCm", "fishCaught", "flyOneCm", "horseOneCm", "jump", "junkFished", "leaveGame", "minecartOneCm", "mobKills", "pigOneCm", "playerKills", "playOneMinute", "sprintOneCm", "swimOneCm", "timeSinceDeath", "treasureFished", and "walkOneCm". 當一個玩家完成分判據中的行為,分數會自動增加。 26
stat.useItem(統計.使用物品) 分判據是方塊或物品的ID數和ID名(如"stat.useItem.1"和"stat.useItem.minecraft.stone")。大部分方塊和物品都被接受,除了某些不存在物品形式的方塊。

物品的使用次數會隨着玩家使用的方塊或物品的次數增加而增加。 "使用" 在下列情況被定義為:

  • 斧頭打火石鉸剪鋤頭 可以消耗它們的耐久度。 即使沒有損耗,使用次數也會增加,例如當它們用於破壞一個方塊。 每右擊魚竿蘿蔔魚竿一次,它們的使用次數就會增加,即使它們沒有損耗. 當盔甲有損耗時,使用次數不會增加。
  • 一個方塊被放置,A block does not have to be placed or even have the possibility of being placed. 當然方塊有特定條件被放置,但是使用次數 whether a block can and is placed, 例如, requires water to be directly horizontally adjacent to the block on which it is being placed and needs to be placed on top of either , red sand, 泥土, podzol, 或一個草地。但是使用次數會在玩家拿着這些方塊右擊之後增加(即使是 the "Use Item/Place Block" control).
  • , 生成蛋, 任何一種 礦車, 物品展示框, ,終界之眼, 終界珍珠, 雞蛋, 積雪球, , 任何一種可掟的 藥水, 附魔之瓶, 或 魚竿 生成一個實體。
  • One of the two usable dyes are properly used. Either when cocoa beans place cocoa pods on jungle wood or bone meal is used to grow plants, such as crops or grass. The value does not increment when a dye is used on a sheep.
  • A bucket of milk, potion, or any food, save cake which is placeable, is consumed.
  • An empty map, bucket, lava bucket, water bucket, milk, book and quill, or potion creates a new item. The value does not increment when bowl becomes mushroom stew or a bucket becomes milk.
  • A record is placed in a jukebox. Each record has a different stat.

The value, however, does not increment when items are used on mobs, whether to name, tame, feed, breed, saddle, leash, shear, milk, or gather stew from; when armor is put on directly; when leather armor is washed in a cauldron; and all instances mentioned above.

There are 357 items attainable in creative mode, without using commands and including blocks with similar IDs but different datavalues, that can use this stat and 195 that cannot.

318 (636)[note 1]
stat.breakItem(統計.破壞物品) The sub-criteria are the ID number (such as "stat.breakItem.256") or ID name (such as "stat.breakItem.minecraft.bow") of an item with durability.

The value increments when the durability runs out. The durability runs out when the condition for losing durability for the item is met, and the durability becomes negative, which is the first use after the durability is zero.

50 (100)[note 1]
stat.mineBlock(統計.挖掘物品) The sub-criteria are the ID number (such as "stat.mineBlock.1") or ID name (such as "stat.mineBlock.minecraft.stone") of a block. Most blocks are accepted, except for various indestructible or technical blocks.

This increments when a player mines a block. "Mine" is defined as when a player destroys a block in a way that an item could/would drop, unless the block does not drop items like glass, or another block would be created like ice. The value does not increase when in Creative mode and will still increase if doTileDrops is set to false.

135 (270)[note 1]
stat.killEntity(統計.殺死實體) The sub-criteria are the name of an entity. Valid names are: "Bat", "Blaze", "CaveSpider", "Chicken", "Cow", "Creeper", "Enderman", "EntityHorse", "Ghast", "LavaSlime", "MushroomCow", "Ozelot", "Pig", "PigZombie", "Sheep", "Silverfish", "Skeleton", "Slime", "Spider", "Squid", "Villager", "Witch", "Wolf", and "Zombie". Increments when a player has killed the specified mob. 24
stat.entityKilledBy(統計.被實體殺死) The sub-criteria are the name of an entity. Valid names are: "Bat", "Blaze", "CaveSpider", "Chicken", "Cow", "Creeper", "Enderman", "EntityHorse", "Ghast", "LavaSlime", "MushroomCow", "Ozelot", "Pig", "PigZombie", "Sheep", "Silverfish", "Skeleton", "Slime", "Spider", "Squid", "Villager", "Witch", "Wolf", and "Zombie". Increments when a player has been killed by the specified mob.

Note that if the name of a passive mob is used the value will never increase, as those mobs are not capable of hurting the player.

24
teamkill(團隊擊殺數) The sub-criteria are the color of a team. Valid colors are: "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", and "white". Increments when a player has killed a member of a team with the specified color. 16
killedByTeam(團隊被擊殺數) The sub-criteria are the color of a team. Valid colors are: "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", and "white". Increments when a player has been killed by a member of a team with the specified color. 16

ID名的增加代表混合判據會是之前的兩倍數量,然何人事實上數字ID的判據和ID名的判據在數量和本質上是相同的。為了方便起見,第一個表格顯示了接受的ID,第二個表格顯示了接受的ID名。

  1. 1.0 1.1 1.2 1.3 在版本14w06a之前,stat.craftItem, stat.useItem, stat.breakItem 和 stat.mineBlock只接受數字ID而不接受ID名。

在任何實體中無論何種判據,玩家的分數都可以透過命令的方式進行修改,生命值除外。可以增加或減少特定的值,也可以直接設定成某一特定值。命令方塊也能透過參數score_name以及score_name_min對玩家的分數進行監測。在上述參數中name為所檢測對象中的內部名稱。score_name表示玩家分數最多為某一特定值,而score_name_min則為玩家分數至少為某一特定值。舉例來説,在命令方塊中輸入"@p[score_deaths=5,score_deaths_min=1]"即製作一個可以當如下情況方能輸出的 紅石比較器: 基於"死亡數量"判據下,假定deaths為其中的一個對象,選擇死亡次數至少1次,最多為5次的玩家。

計分板命令

命令 描述
scoreboard <objectives|players|teams> 使用計分板系統的底層命令。
scoreboard objectives [list] 列出所有已知的對象,其顯示名稱以及判據。可選參數"list"與之效果相同並可以省略。
scoreboard objectives add <name> <criteria> [display name...] 透過輸入內部名稱名稱 (name),某一判據 (criteria),以及可選項——顯示名稱 (display name),建立一個新的對象。顯示名稱的預設值為名稱所對應的值。前文中已經為這些參數進行了纖細的敘述。所有的參量都是區分大小寫的。
scoreboard objectives remove <name> 在計分板系統中移除名稱為name的對象的所有數據。會從對象列表,玩家分數中刪除對應數據,若在顯示列表中,刪除後即無法顯示。
scoreboard objectives setdisplay <slot> [objective] 以某種特定的顯示形式 (slot)顯示對象 (objective)。其中slots分為"列表 (list)"和"側邊欄 (sidebar)"。"列表"會在玩家列表中以黃色文字在玩家名稱後顯示分數資訊(預設為 Tab 鍵),並不會顯示對象名稱。"側邊欄"則會在熒幕右側實時顯示分數資訊,並會在列表的最上方顯示對象的顯示名稱。即使玩家離線,如果在該對象下存在一定分數也會在"側邊欄"中進行顯示。值得注意的是:對象 (objective)參數為可選參數:如果不提供對象則顯示列表會並清零(便為其預設狀態)。
scoreboard objectives cleardisplay 未使用;可能為BUG。在代碼中亦沒有相關説明,但是在語言檔案以及錯誤資訊中有所提及。如果希望使用清楚顯示數據,可以參考上一命令。
scoreboard players [list] 顯示所有被追蹤的玩家,換句話説,在計分板系統中的玩家。可選參數"list"的效果相同,可以省略。
scoreboard players set <player> <objective> <score> 對象玩家的分數設定為score的值,會覆蓋之前的數據。
scoreboard players add <player> <objective> <count> 對象 (objective)下的玩家 (player)分數增加某一特定值countcount至少為1。
scoreboard players remove <player> <objective> <count> 對象 (objective)下的玩家 (player)分數減少某一特定值countcount至少為1。
scoreboard players reset <player> 重設玩家 (player)分數。需要注意:這一命令會對所有對象都產生影響,並不只是將其置零:而是將其整體移除計分板系統。並且很神奇的是,這一命令在與諸如'@p'這類的提示字元的配合下並不能正常使用。是一個BUG?
scoreboard players player 未使用;可能為BUG。在代碼中亦沒有相關説明,但是在語言檔案以及錯誤資訊中有所提及。目前命令中也沒有在聊天窗口中顯示特定分數的命令,可能為正在製作的特性。

隊伍命令

命令 描述
scoreboard teams list [teamname] 列出已建立的隊伍, 並顯示隊伍的顯示名稱及其中有哪些玩家. The optional teamname parameter can be used to display all players on a particular team. If teamname is specified, it must exist and must have players.
scoreboard teams add <name> [display name... 建立一個隊伍並給他一個名稱級顯示名稱。 name must not be used by an existing team, and must be at most 16 characters. display name must be at most 32 characters, else the team will be created with a displayname identical to name and the command will seem to fail.
scoreboard teams remove <name> 從分數版裡刪除一個隊伍。 name must be an existing team.
scoreboard teams empty <name> 從分數版裡刪除隊伍裡所有的玩家。 The help text says that the subcommand is "clear", not "empty"; bug? name must be an existing team, and the team must have at least one player.
scoreboard teams join <team> [players...] 使某一個玩家加入某一個隊伍。 如果不輸入玩家則會讓所有玩家加入 team 必須存在. 注:不線上的玩家也可以加進去,包括已經在隊伍的玩家.
scoreboard teams leave [players...] 讓某一個玩家退出隊伍。 不輸入玩家會直接讓所有玩家退出該隊伍 輸入的玩家必須在隊伍裡 - it is possible to get a partial success and partial failure, but a command block will report only the failure.
scoreboard teams option <team> <color|friendlyfire|seeFriendlyInvisibles> <value> 隊伍的設定的基礎指令 N/A
scoreboard teams option <team> color <value> 這個指令會給所有在該隊伍的玩家的名字上色或修改字體,上色的地方為:玩家頭頂上顯示的名字,玩家列表裏的玩家名和側邊欄裡的玩家名. 所有可用的顏色為:"black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", 和"white". Other valid values are"reset" (names show in default color and formatting), "obfuscated" (same as effect seen in obfuscated parts of the End Poem), 字體有:"bold"(粗體字), "strikethrough"(刪除線), "underline"(下劃線), and "italic"(斜體字). See Formatting Codes for information about how these will appear. team 必須存在, and value 必須是有效的數值.
scoreboard teams option <team> friendlyfire <true|false> The default setting,如果選擇 true,則該隊伍的玩家可以對打(PVP). 如果選擇 false,則該隊伍的玩家無法對打 , 弓和飛濺型的傷害藥水仍然無效,但是其它藥水仍然會給同隊玩家附上相應的效果 team必須存在,並且只能輸入"true"或者"false".
scoreboard teams option <team> seeFriendlyInvisibles <true|false> 如果選擇true,則玩家將看不到同隊的隊友的名字(包括他們自己)但名字只是半透明,並不是完全隱形的 team 必須存在, 並且只能輸入"true"或者"false".

NBT 格式

計分板數據儲存在地圖資料夾下的scoreboard.dat檔案中,儲存形式為GZip'dNBT格式

  • 根標籤。
    •  data: 計分板數據、
      •  Objectives: 代表對象的複合標籤列表。
        • 對象。
          •  CriteriaName: 該對象的判據。必須為以下四種之一:"虛擬環境 (dummy)", "死亡次數 (deathCount)", "殺敵數量 (playerKillCount)"以及"擊殺數量 (totalKillCount)"。
          •  DisplayName: 對象的顯示名稱。如果在建立對象時沒有涉及,則會與下文中名稱標籤相同。
          •  Name: 對象的內部名稱
      •  PlayerScores: 在計分板系統中所追蹤的分數的複合標籤列表。
        • 擁有分數的玩家或對象。
          •  Score: 此對象中玩家的分數。
          •  Name: 對象中擁有此分數的玩家名稱。
          •  Objective: 玩家分數所在對象的內部名稱
      •  DisplaySlots: 正在顯示的對象的顯示模式。
        •  slot_0: 正在以"列表"模式顯示的對象的內部名稱
        •  slot_1: 正在以"側邊欄"模式顯示的對象的內部名稱

歷史

u
13w04a加入計分板系統

畫廊

遊戲內容

Advertisement