命令

From Minecraft基岩版开发Wiki

命令(Command)是通过输入特定文本字符串而激活的高级功能。

使用方法[edit]

命令列表[edit]

命令概述
命令 描述 权限等级 命令类型 未知属性
/? Provides help/list of commands. 0 8 64
/ability Sets a player's ability. 1 0 0
/addrider Adds a rider to an entity 1
/agent commands.agent.description 1 6 0
/aicreate Creates Al goals for a mob. 1
/aigoals Toggles drawing AI goals 1
/aistop Stops Al goals for a mob. 1
/alwaysday Locks and unlocks the day-night cycle. 1 0 0
/audioaction commands.audioaction.description 1
/automate Runs am automation behavior tree. 1
/bhave Runs a behavior tree. 1
/bossbar Creates and modifies boss bars 0
/bounds Enables Disables Drawing Bounding Boxes 1
/camera commands.camera.description 1
/camerashake Applies shaking to the player's camera with a specified intensity and duration. 1 0 0
/changedimension Teleports player to a position in another dimension. 1
/changename Changes the name of a mob 1
/changesetting commands.changesetting.description 4 0 0
/cheat_ability pins an ability to a specified state, simulating cheating 0
/cheat_local_player_health sets a player's health to the specified value, but doesn't send it to the server, for testing server authoritative health changes 0
/cheat_movement_debug enables debug rendering for movement cheating 0
/classroommode Attempt to launch and connect to Classroom Mode. 0 0 0
/cleanroom Helper command that Runs 'spawning' and 'wipeout' at the same time. So all entities go away and do not come back through spawning. 1
/clear Clears items from player inventory. 1 0 0
/clearloadedstructures Clears loaded structures 1
/clearspawnpoint Removes the spawn point for a player. 1 0 0
/clone Clones blocks from one region to another. 1 0 0
/closewebsocket Closes websocket connection if there is one. 0
/closewebsocket Closes websocket connection if there is one. 0 6 0
/code Launches Code Builder. 0 0 0
/codebuilder commands.codebuilder.description 1 4 0
/connect Attempts to connect to the websocket server on the provided URL. 2 16 0
/corruptworld Corrupts the world loaded on the server. 1
/crashclient Crashes this Minecra ft instance. 1
/crashserver Crashes the server you are connected to (could be local). 1
/createlocalworld Creates a new world (aka level) on the local machine. 1
/currenttick Sets the current tick of the world 0
/daylock Locks and unlocks the day-night cycle. 1 0 0
/debugcamera commands.debugcamera.description 1
/debugprofile Captures the last N frames and saves the data to a file. 1
/dedicatedwsserver Attempts to connect to the websocket server on the provided URL. 0 6 0
/deop Revokes operator status from a player. 1 64 0
/destroyblock Destroys the block at a given position 1
/dialogue Opens NPC dialogue for a player. 1 0 0
/difficulty Sets the difficulty level. 1 0 0
/dumpblocknames Gets block names from a range and dumps them into a string. 1
/dumpblockpalette Outputs valid block nbt for vanilla and bedrock blocks in a binary format. 1
/dumpentitiesclient Dump out info on all entities in the current dimension 1
/dumpentitiesserver Dump out info on all entities in the current dimension 1
/effect Add or remove status effects. 1 0 0
/enableedunpc 是否允许在地图内生成NPC: true允许, false禁止 0
/enableencryption commands.enableencryption.description 0 6 0
/enchant Adds an enchantment to a player's selected item. 1 0 0
/enchantrandom Enchants the item a player is holding with a random spell. 1
/equip Equips a selection of entities with an item 0
/event Triggers an event for the specified object(s) 1 0 0
/execute Executes a command on behalf of one or more entities. 1 0 0
/fill Fills all or parts of a region with a specific block. 1 0 0
/fillchestblock Fills chest with item. 1
/filldrive Fills the user save and keeps a certain amount of bytes remaining. 1
/filllevelstorage Fill level storage with bytes of dummy data. 1
/findanchoredbuildpos Given a specific destination block position, this method finds a valid position for the player to be at in order for them to place a block at that position. 1
/findflatarea Finds a flat area for further actions. 1
/findnearbypickup Finds a nearby pickup. 1
/fixbiomes Regenerate biomes in a chunk radius around the players 1
/fly Sets the player's flying status 1
/fog Add or remove fog settings file 1 0 0
/function Runs commands found in the corresponding function file. 1 0 0
/gamemode Sets a player's game mode. 1 0 0
/gamerule Sets or queries a game rule value. 1 64 0
/gametest Interacts with gametest. 1 1 0
/getblockname Gets block names at a given blockpos 1
/getchestcontents Gets contents of a chest 1
/getchunkdata Gets pixels for a specific chunk. 3 6 0
/getchunks Gets list of chunks that are loaded. 3 6 0
/getdurability Durability of selected item. 0 1 0
/geteduserverinfo commands.geteduserverinfo.description 0 6 0
/getexperience Returns the players current experience (score) 1
/getmobdebuginfo Retrieves the debug string for a given mob. 1
/getpower Gets the power at a given blockpos. 1
/getselecteditemcount Determine item count of inventory item. 1
/getspawnpoint Gets the spawn position of the specified player(s). 3 6 0
/getstructure Gets the structure that the player is current occupying 1
/gettopsolidblock Gets the position of the top non-air block below the specified position 0‌ ‌[仅教育版] / 1‌  ‌[仅基岩中国版] 6 0
/getworidname Gets the name of the current world (aka level). 1
/give Gives an item to a player. 1 0 0
/globalpause Sets or gets the paused state of the game for all players. 3 6 0
/health Modifies a mobs's health. 1
/help Provides help/list of commands. 0 8 64
/hunger Modifies a player's hunger level. 1
/immutableworld Sets the immutable state of the world. 1 0 0
/insomnia Gets and sets the player's insomnia level. 1
/islargechestblock Check to see if block is a large chest. 1
/isplayercrouching Returns if the player is crouching 1
/isplayerflying Returns if the player is flying 1
/isplayergrounded Returns if the player is grounded 1
/isworldloaded Checks if the client is loaded into a world. 1
/joinlangame Join a game on a remote host. 1
/kick Kicks a player from the server.‌ ‌[仅基岩版] / Removes a player from the game.‌ ‌[仅教育版] 1‌  ‌[仅基岩中国版] / 3‌ ‌[仅教育版] 64 0
/kill Kills entities (players, mobs, etc.). 1 0 0
/kit Gives the local player a kit. 0
/leaveworld Leaves the current world (aka level), goes back to start menu screen. 1
/lighttexturewriter Write the current dimension light texture to disk 1
/list Lists players on the server. 0 64 0
/listd commands.listd.description 3 6 0
/loadbehaviortreedefinitions Loads all of the automation behavior tree definitions. 1
/locate Displays the coordinates for the closest structure of a given type. 1 0 0
/log Modifies log settings or filters. 0
/lookat Forces the player to look at a floating point location 1
/me Displays a message about yourself. 0 32 64
/memwarn Fires low memory warning. 0
/mobevent Controls what mob events are allowed to run. 1 0 0
/mobinfo Toggles drawing mob information 1
/msg Sends a private message to one or more players. 0 32 64
/music Allows you to control playing music tracks. 1 0 0
/nearbyentityisbaby Returns true if the nearest entityType is a baby 1
/notifyprofiler Sends a message to the profiler to peform an action. 1
/op Grants operator status to a plaqer. 2 64 0
/openlocalworld Opens an existing world (aka level) on the local machine. 1
/ops Reloads and applies permissions. 4 0 0
/option Allows you to check or change the value of an option for the primary user 1
/packetprofile outputs verbose historq of packet stats to console 0
/particle Creates a particle emitter 1 0 0
/particlelegacy Fires a legacy particle in the world 0
/paths Disables Drawing Paths 1
/pause commands.pause.description 1
/permission Reloads and applies permissions. 4 0 0
/placefeature Places a feature or feature rule in the given chunk. 1
/placefromhand Places the current selected inventory item to the given position, if possible 1
/placejigsaw Places a jigsaw piece and goes through the jigsaw generation in the given chunk. 1
/placestructure Places a structure 1
/playanimation Makes one or more entities play a one-off animation. Assumes all variables are setup corrrectly. 1 0 0
/playerstat Gets stats about a player 1
/playsound Plaqs a sound. 1 0 0
/postrackclient Track a position within the world using a handle (Client) 1
/postracksrv Track a position within the world using a handle (Server) 1
/profile Shows the players profile with the specified name. 1
/querytarget Gets transform, name, and id information about the given target entity or entities. 0‌ ‌[仅教育版] / 2‌  ‌[仅基岩中国版] 6 0
/quit Quit the app. 1
/raid Triggers a raid at the originator's location, if they are in or near a village 1
/record Records or replays a session. 1
/redstonetest Outputs the redstone graph to a visual studio test. 1
/register3pserver Registers a 3P Server in the 3P Server Repositoty. 1
/reload Reloads all function files from all behavior packs. 2 0 0
/reloadanims Reload animation data. 1
/remove Removes entities (players, mobs, etc.). 2 0 0
/removeedunpc 删除地图内所有NPC 0
/replaceitem Replaces items in inventories. 1 0 0
/resourceuri Sets the resource URI in pause menu 0 0
/restart commands.restart.description 1
/resupply Triggers resupply on an entity's economy trade table. 1
/ride Makes entities ride other entities, stops entities from riding, makes rides evict their riders, or summons rides or riders. 1 0 0
/rot Sets a player's current rotation. 1
/save Control or check how the game saves data to disk. 4 0 0
/savestructure Saves a structure 1
/say Sends a message in the chat to other players. 1 32 64
/schedule Schedules an action to be executed once an area is loaded, or after a certain amouont of time. 1 0 0
/scheduler Disables Drawing scheduler information 1
/scoreboard Tracks and displays scores for various objectives. 1 0 0
/seencredits Marks or unmarks an actor as having seen credits. 1
/selectinventoryitem Equips a passed item. 1
/sendmodalform Sends a request to show a form to the target player 1
/sendshowstoreoffer Sends a request to show a store offer to the target player. 1
/serverinfo Show Environment in which server is running 1
/setblock Changes a block to another block. 1 0 0
/setmaxplayers Sets the maximum number of players for this game session. 3 0 0
/setworldspawn Sets the world spawn. 1 0 0
/showallitems Sends a request to show third party store offers to player. 0
/showfrustum Displays and freezes the player frustum. 1
/simlock Locks simulation time. 1
/simscale Scales the passage of simulation time. 1
/skin Gets the current player skin. 1
/spawnfeature commands.spawnfeature.description 1
/spawngroup Spawns a mob group at a specified location. 1
/spawning Toggles the spawning of enti ties. 1
/spawnitem Spawns an item entity at position 1
/spawnmob Spawns a mob to a particular state. 1
/spawnpoint Sets the spawn point for a plaqer. 1 0 0
/spreadplayers Teleports entities to random locations. 1 0 0
/stop Stops the server. 4 0 0
/stopsound Stops a sound. 1 0 0
/stoptime Resumes time elapse. 1
/structure Saves or loads a structure in the world. 1 0 0
/summon Summons an entity. 1 0 0
/systemstat Returns or sets runtime statistics for the game 1
/tag Manages tags stored in entities. 1 0 0
/takepicture Takes a photo of a player or from a player's point of view. 1 0 0
/teleport Teleports entities (players, mobs, etc.). 1 0 0
/tell Sends a private message to one or more players. 0 32 64
/tellraw Sends a JSON message to players. 1 32 64
/test Exectues‌[原文如此] a test via the test manager. 1
/testassets Upload or download test assets via the test manager. 1
/testfor Counts entities (plagers, mobs, items, etc.) matching specified conditions. 1 0 0
/testforblock Tests whether a certain block is in a specific location. 1 0 0
/testforblocks Tests whether the blocks in two regions match. 1 0 0
/tickingarea Add, remove, or list ticking areas. 1 0 0
/time Changes or queries the world's game time. 1 0 0
/timelock Resumes time elapse. 1
/title Controls screen titles. 1 32 0
/titleraw Controls screen titles with JSON messages. 1 32 0
/toggledownfall Toggles the weather. 1 0 0
/tp Teleports entities (players, mobs, etc.). 1 0 0
/tpb Teleport to specified biome 0
/tptobiome Teleport to specified biome 0
/tptosuitabletree Teleports the player to a position where they can chop down a tree. 1
/transferserver Transfers a player to another server. 1
/validategamelighting Validate game lighting for a specified region 1
/videostream Attempts to connect to the websocket server to send a video stream. 0 0 0
/videostreamaction Perform a videostream related action. 0 0
/villagehero Forces the Village to start bestowing the Hero of the Village effect as if you won a raid. 1
/villages Disables Drawing Village Debug Info 1
/w Sends a private message to one or more players. 0 32 64
/wb Toggle World Builder status of caller. 1 0 0
/weather Sets the weather. 1 0 0
/whitelist Manages the server whitelist. 4 0 0
/wipeout Wipes out entities across all dimensions. 1
/worldbuilder Toggle World Builder status of caller. 1 0 0
/wsserver Attempts to connect to the websocket server on the provided URL. 2 16 0
/xp Adds or removes player experience. 1 0 0

命令可用性[edit]

命令 BE CN EE BEDEV CNDEV BDS CB DC UC EDU EX
/?
/ability
/addrider
/agent
/aicreate
/aigoals
/aistop
/alwaysday
/audioaction
/automate
/bhave
/bossbar
/bounds
/camera
/camerashake 即将到来 即将到来 即将到来
/changedimension
/changename
/changesetting
/cheat_ability
/cheat_local_player_health
/cheat_movement_debug
/classroommode 是‌[隐藏] 是‌[隐藏]
/cleanroom
/clear
/clearloadedstructures
/clearspawnpoint 即将到来 即将到来 即将到来
/clone
/closewebsocket
/closewebsocket
/code 是‌[隐藏]
/codebuilder
/connect
/corruptworld
/crashclient
/crashserver
/createlocalworld
/currenttick
/daylock
/debugcamera
/debugprofile
/dedicatedwsserver
/deop
/destroyblock
/dialogue
/difficulty
/dumpblocknames
/dumpblockpalette
/dumpentitiesclient
/dumpentitiesserver
/effect
/enableedunpc
/enableencryption
/enchant
/enchantrandom
/equip
/event 即将到来 即将到来 即将到来
/execute
/fill
/fillchestblock
/filldrive
/filllevelstorage
/findanchoredbuildpos
/findflatarea
/findnearbypickup
/fixbiomes
/fly
/fog 即将到来 即将到来 即将到来
/function
/gamemode
/gamerule
/gametest 即将到来 即将到来 即将到来
/getblockname
/getchestcontents
/getchunkdata 是‌[隐藏] 是‌[隐藏]
/getchunks 是‌[隐藏] 是‌[隐藏]
/getdurability 是‌[隐藏]
/geteduserverinfo
/getexperience
/getmobdebuginfo
/getpower
/getselecteditemcount
/getspawnpoint 是‌[隐藏] 是‌[隐藏]
/getstructure
/gettopsolidblock
/getworidname
/give
/globalpause 是‌[隐藏] 是‌[隐藏]
/health
/help
/hunger
/immutableworld
/insomnia
/islargechestblock
/isplayercrouching
/isplayerflying
/isplayergrounded
/isworldloaded
/joinlangame
/kick
/kill
/kit
/leaveworld
/lighttexturewriter
/list
/listd
/loadbehaviortreedefinitions
/locate
/log
/lookat
/me
/memwarn
/mobevent
/mobinfo
/msg
/music 即将到来 即将到来 即将到来
/nearbyentityisbaby
/notifyprofiler
/op
/openlocalworld
/ops
/option
/packetprofile
/particle
/particlelegacy
/paths
/pause
/permission
/placefeature
/placefromhand
/placejigsaw
/placestructure
/playanimation 即将到来 即将到来 即将到来
/playerstat
/playsound
/postrackclient
/postracksrv
/profile
/querytarget
/quit
/raid
/record
/redstonetest
/register3pserver
/reload
/reloadanims
/remove
/removeedunpc
/replaceitem
/resourceuri
/restart
/resupply
/ride 即将到来 即将到来 即将到来
/rot
/save
/savestructure
/say
/schedule 即将到来 即将到来 即将到来
/scheduler
/scoreboard
/seencredits
/selectinventoryitem
/sendmodalform
/sendshowstoreoffer
/serverinfo
/setblock
/setmaxplayers
/setworldspawn
/showallitems
/showfrustum
/simlock
/simscale
/skin
/spawnfeature
/spawngroup
/spawning
/spawnitem
/spawnmob
/spawnpoint
/spreadplayers
/stop
/stopsound
/stoptime
/structure 即将到来 即将到来 即将到来
/summon
/systemstat
/tag
/takepicture
/teleport
/tell
/tellraw
/test
/testassets
/testfor
/testforblock
/testforblocks
/tickingarea
/time
/timelock
/title
/titleraw
/toggledownfall
/tp
/tpb
/tptobiome
/tptosuitabletree
/transferserver
/validategamelighting
/videostream
/videostreamaction
/villagehero
/villages
/w
/wb
/weather
/whitelist
/wipeout
/worldbuilder
/wsserver
/xp

历史[edit]

携带版(Alpha)
0.7.4加入了对命令的支持,但尚未实现任何命令的运行。
0.16.0build 1加入了/clearfixedinv/clone/deop/execute/fill/gamemode/give/help(及其别名/?)、/kill/list/op/say/setblock/setfixedinvslot/setworldspawn/spawnpoint/summon/tell(及其别名/msg/w)、/testforblock/testforblocks/time/toggledownfall/tp(及其别名/teleport)、/weather/wsserver/xp命令。
大部分命令的功能与Java版1.10相同。差别在于:不支持数据标签、/clone命令无法使用forced模式、/gamemode命令仅允许指定创造模式和生存模式、/give命令中玩家目标为可选参数,以及/execute命令中实体目标为可选参数。
build 2移除了/clearfixedinv/setfixedinvslot及其他教育版相关的命令。
build 5加入了/enchant命令。
携带版
1.0.00.17.0.1加入了/locate/connect命令。
0.17.0.2移除了/locate命令。
1.0.0.0重新加入了/locate命令。仅能用于查找要塞。
1.0.31.0.3.0加入了/transferserver命令。
1.0.51.0.5.0加入了/clear/difficulty/effect/gamerule/me/particle/playsound/replaceitem/spreadplayers/stopsound/testfor/title命令。
1.0.5.3移除了/particle命令。
/effect命令的amplifier参数不再允许为负值。
1.1.01.1.0.0/replaceitem支持canplaceoncandestroy
/locate可查找其他结构。
加入了游戏规则dodaylightcycledoentitydropsdofiretickdomobspawningdomoblootdotiledropsdoweathercyclekeepinventorymobgriefing
?加入了/setmaxplayers
基岩版
1.2.01.2.0.2加入了/tickingarea
1.4.0?/transferserver移动到开发者命令,玩家不再能够正常使用。
1.5.01.5.0.0为启用教育版功能的世界加入了5个新命令。
1.6.01.6.0.6/gamerule加入了游戏规则doInsomnia
1.7.01.7.0.2加入了/scoreboard
加入了了游戏规则commandblocksenabled
1.8.01.8.0.8重新加入了/particle
加入了randomTickSpeed游戏规则。
加入了/reload
加入了/function
1.9.01.9.0.0加入了/tellraw
加入了showdeathmessages游戏规则。
加入了immediaterespawn游戏规则。
/particle加入了新粒子。
1.11.01.11.0.1加入了/resupply,但并没有作用。
1.11.0.3加入了/mobevent
1.12.01.12.0.2加入了spawnradius游戏规则。
/clear的特殊值功能失效。
加入了sendcommandblockfeedback游戏规则。
/particle加入了更多的新粒子。
为地图制作及Add-ons加入了新命令。
?移除了/resupply
1.14.01.14.0.3/clear的特殊值功能被修复。
1.16.01.16.0.57加入了/kick命令。
正式版加入了/whitelist命令。
1.16.1001.16.100.52加入了/playanimation/ride/structure命令。
1.16.100.54加入了/fog命令。
1.16.100.57加入了/camerashake/clearspawnpoint/event命令。
1.16.100.58加入了/music命令。
1.16.100.59加入了/schedule命令。
1.16.2101.16.210.53移除了/mixer命令。
1.16.210.54重新加入了/mixer命令。
1.16.210.58再次移除了/mixer命令。
1.16.210.60加入了/gametest命令。
1.17.01.16.230.50/whitelist重命名为/allowlist
1.17.101.17.10.22加入了/dialogue命令。

漏洞[edit]

关于“命令”的漏洞在国际版中由漏洞追踪器维护,请在此汇报漏洞。

参见[edit]