Deze pagina heeft vertaling nodig Deze pagina bevat te veel woorden uit een andere taal.
|
Opdrachten zijn geavanceerde functies waar spelers en beheerders gebruik van kunnen maken.
Gebruik[]
Spelers kunnen opdrachten in de cliënt via de chat uitvoeren. Hierbij is de speler verplicht om de opdracht te starten met een /. Wanneer je een opdracht wil uitvoeren kan je eerst de chat openen (T) en vervolgens een / typen. Het is echter ook mogelijk om direct de opdrachtregel te openen door op / te klikken. Hierbij wordt automatisch een / toegevoegd. Door gebruik te maken van ↑ en ↓ kunnen eerder uitgevoerde opdrachten bekeken worden. Door op Tab ↹ te drukken tijdens het invoeren van opdrachten doorloop je mogelijke opdrachten of argumenten en kan je automatisch opdrachten of argumenten aanvullen.
Opdrachten kunnen ook via de console van een server worden uitgevoerd. Het gebruik van een / voor een opdracht is via de console niet verplicht.
Daarnaast is het ook nog mogelijk om opdrachten uit te voeren in opdrachtblokken. Ook hier is het gebruik van een / niet verplicht.
Lijst van opdrachten[]
Spelersopdrachten[]
Deze opdrachten kunnen worden uitgevoerd door alle spelers, al staat "Cheats toegestaan: UIT" of ze op een server geen beheerder zijn.
Commando | Beschrijving | Succes bij[note 1] |
---|---|---|
help [pagina | opdracht] ? [pagina | opdracht] |
Schrijft in de chat een lijst met alle toestaande opdrachten verdeeld in paar pagina's of de schrijfwijze van opdracht. Let op: De opdrachten die de speler niet kan gebruiken zijn ook niet in de lijst zichtbaar, bijvoorbeeld multiplayer opdrachten in singleplayer. |
Succes wanneer pagina (het is een getal) bestaat of er helemaal niet staat. Technisch mislukt opdracht altijd, maar er komt wel iets. |
me <gebeurtenis> | Schrijft in de chat: je naam gebeurtenis, bijvoorbeeld /me is aan het houthakken geschreven door iemand die Daan heet, wordt Daan is aan het houthakken. Doelaanwijzers (@p, @a, @r, @e en @s) wordt veranderd in de bijbehorende naam. Aanwijzers die uit meerdere personen bestaan, worden geschreven als eerste speler, tweede speler, ..., en laatste speler | De doelaanwijzer moet valide zijn. |
tell <speler> <bericht> msg <speler> <bericht> w <speler> <bericht> |
Stuurt een privebericht naar de aangewezen speler. Zeer handig als je op een server iets aan iemand wilt vertellen zonder dat de andere spelers het lezen. Doelaanwijzers weken in bericht, zie boven. De bericht zal eruitzien als <naam van diegene die het bericht stuurt> fluistert naar jou: <bericht>. | Doelaanwijzers moeten valide zijn en <speler> online |
- ↑ De factoren die de opdracht als "succesvol uitgevoerd" bepalen. Dit word gebruikt bij verschillende dingen, zoals de werking van een Redstone-comparator, die naast een Commando_blok met een opdracht erin staat. Let op: niet alle succesvolle opdrachten doen iets, en sommige mislukte opdrachten werken wel.
Beheerdersopdrachten[]
Deze opdrachten vereisen een beheerdersstatus in multiplayer of 'Cheats toegestaan: AAN' in singleplayer. Ook kunnen ze in een console gebruikt worden.
Let op: De andere beheerders kunnen zien dat je een van deze opdrachten gebruikt hebt.
Commando | Beschrijving | Succes bij |
---|---|---|
achievement give <prestatie> [speler] | Gives a player an achievement, and all prerequisite achievements. achievementname must use "achievement." followed by the achievement name (see Scoreboard for valid names). If playername is not specified, the achievement will be given to the command's executor. | achievementname must be a valid achievement name. playername is not optional in command blocks and player must be online. |
clear <spelernaam> [voorwerp] [metadata] | Clears the inventory of playername or the specified item:data. | At least one item must be removed, and playername must be online. |
debug start | stop | Starts a new debug profiling session or stops the session currently running. It notifies about potential performance bottlenecks in the console when active and creates a profiler results file in the folder debug when stopped. | Can only stop if a session is running. Cannot be used in a command block. |
defaultgamemode survival | creative | adventure | Sets the default game mode that is shown on the world selection menu. New players that join the world will be put into the default game mode; i.e., if the default game mode is creative, new players will start in creative. The game modes can be abbreviated to "s/c/a" or "0/1/2" respectively. This command cannot enable or disable Hardcore mode. | Must be a valid game mode. |
difficulty peaceful | easy | normal | hard | Changes the difficulty. The difficulties can be abbreviated to "p/e/n/h" or "0/1/2/3" respectively. | Must be a valid difficulty. |
effect <spelernaam> <effect> [seconden] [amplifier] | Gives the targeted player the specified effect for the specified time (default is 30 seconds). Effects have a limit of 1,000,000 seconds, and the amplifier field has a limit of 255. Effect id's can be found on the potion effects page. Setting seconds to 0 clears this effect. If you put the amplifier to a number of a variably high value, it will not give the desired amplifier. | If clearing an effect, the player must have this effect. Must be a valid effect. Playername must be online. |
effect <spelernaam> clear | Verwijdert alle effecten van spelernaam. | Minstens één effect moet worden verwijderd en spelernaam moet online zijn. |
enchant <spelernaam> <enchantment ID> [enchantment level] | Enchants the item that the player is currently holding, according to enchantment ID. Note that this works within the normal limitations of enchanting items. Enchantments can only be applied to items which can normally receive that specific enchantment. Enchantment levels can not be above the normal highest achievable for the selected enchantment. Conflicting or overpowering enchantment combinations usually prevented are also prevented with this command. | The enchantment ID must be valid, the level must be valid for this enchantment (unless the held item is also invalid), the held item must be able to accept this enchantment, the held item cannot have conflicting enchantments, and playername must be online. |
gamemode <survival | creative | adventure> [spelernaam] | Changes the game mode for playername. The game modes can be abbreviated to "s/c/a" or "0/1/2" respectively. If no playername is given, it will set your own gamemode. Remember, this will only affect playername and no one else. | Player must currently be online, and gamemode must be valid. Playername is not optional for command blocks. |
gamerule <regelnaam> [true | false] | Activates or deactivates the rulename. If true/false is not given, displays the current status of rulename. Available rules are:
|
Succeeds in literally all cases - even absent/invalid rulename or a property besides 'true' or 'false'. |
give <spelernaam> <voorwerp> [aantal] [metadata] [dataTag] | Spawns amount (defaults to 1) of the item defined by item with the specified metadata (defaults to 0) at playername 's location, using dataTag for the "tag" NBT tag. For example typing /give John 5 30 1 {display:{Lore:["Wooden planks"]}} will give a player called John 30 blocks of Spruce Wood Planks with Lore that says "Wooden planks". | Item must be a valid ID or item name, amount must be from 0 to 64, and playername must be online. |
kill | Inflicts 1000 ( × 500) damage to the user, killing the user instantly (a high-level Resistance effect cannot protect the player). Useful when lost, stuck, or to restore health and hunger (assuming you can get your items back easily or the keepInventory gamerule is set to "true"). Death message displays as "playername fell out of the world" "Ouch! That looks like it hurt." | Cannot be used in a command block. |
publish | Opens your single-player game for LAN friends to join. This command appears in the singleplayer cheats. | Cannot be used in a command block. |
playsound <geluid> <spelernaam> [x] [y] [z] [volume] [hoogte] [minimumVolume] | Plays the selected sound to the selected player. The format for sound is as follows:
Voorbeeld: Sound located at .minecraft\assets\sound\mob\pig\death.ogg The value for sound would be written as mob.pig.death, as the command originates from the sound folder. For sequentially numbered files pertaining to the same event (Voorbeeld: various walking sounds), the player must exclude the number of the sound. Voorbeeld: Sound located at .minecraft\assets\sound\mob\pig\say[1-3].ogg The value for sound would be written as mob.pig.say in this case. Since there are multiple mob.pig.say files (say1, say2, and say3), the command will play a randomly selected sound out of the three available. The coordinates x, y, and z are the coordinates to play the sound from. If prefixed with "~", they will be relative to the player's current location. Note that "~" is shorthand for "~0", and thus "~ ~ ~" can be used as a substitute for the player's current location. The volume argument controls the distance from which a sound may be heard. At values less than 1.0, the sound will be quieter and have a smaller sphere within which it may be heard. At values greater than 1.0, the sound will not actually grow louder, but its audible range (a 16-block radius at 1.0) will be multiplied by volume. The minimumVolume argument controls the volume of the sound outside its normal audible sphere. Note that the sound inside this sphere may actually be less than the volume of the sound outside this sphere, if volume is less than minimumVolume. The pitch argument alters both the pitch and the duration of the sound (which means that it's actually changing its speed). |
playername must be online, volume must be at least 0.0, pitch must be between 0.0 and 2.0 (inclusive), minimumVolume must be between 0.0 and 1.0 (inclusive), and the player must be able to hear the sound from where it is played. |
say <bericht> | Broadcasts message to all players on the server. If a multi-person target selector (e.g. @a) is used, the list of names is formatted as "name1, name2, and name3", or "name1 and name2" for two names. Therefore, regardless of any target selectors which are used, this command will only output once. | All target selectors (e.g. @p) in the message must evaluate. |
scoreboard objectives|players|teams | See Scoreboard for more information. Scoreboard-specific commands. | Main Article |
seed | Displays the seed. This command can always be used in single-player mode, regardless of whether cheats are enabled or not. | Always succeeds (if user is a command block, player in singleplayer, or server op). |
setblock <x> <y> <z> <tilename> [datavalue] [oldblockHandling] [dataTag] | Places the block in the x, y and z coordinates specified. | tilename must exist, datavalue must exist if specified, oldBlockHandling must be either "replace", "keep" or "destroy" if specified and dataTag must evaluate if specified. |
setworldspawn [x] [y] [z] | Sets the world's spawn to the specified coordinates. If no coordinates are specified, the world spawn will be set to the executor's current location. | x, y, and z must be within the range -30,000,000 to 30,000,000 (inclusive). x, y, and z are not optional in command blocks. |
spawnpoint <spelernaam> [x] [y] [z] | Sets the spawnpoint of that player to that position, or to the current position if x y and z are not specified. Player is optional if x y z are not specified; will set the spawnpoint of the user to their current location. NOTE: Spawnpoint coordinates must be specified in whole numbers. No decimals. | playername must be online, and x, y, and z must be within the range -30,000,000 to 30,000,000 (inclusive). NOTE: Sleeping in a bed will also set a spawn point where the bed is, but you can only sleep in beds at night. |
spreadplayers <x> <z> [spreidingsAfstand] [maximaleRatio'] [respectTeams] <speler ...> | This command allows players to spread out over a long or short distance.
x and z mark the center of the area across which players are to be spread. spreadDistance is the rough minimum distance players will be spread apart. maxRange is the maximum distance from x, z where players will be put. Note that this distance is not a circular radius; it represents the maximum distance on either coordinate (thus forming a box ranging from x-maxRange to x+maxRange and z-maxRange to z+maxRange). respectTeams may be true or false, and represents whether players should be moved individually or teams should be kept together. player ... is the list of players to spread. |
x and z must be within the range -30,000,000 to 30,000,000 (exclusive), spreadDistance must be at least 0, maxRange must be at least 1.0 greater than spreadDistance, and there must not be too many players to fit within the area (note that if maxRange is larger than 30,000,000, this can fail with even one player if it attempts to place them in the Far Lands). |
summon <EntityName> [x] [y] [z] [dataTag] | Spawns desired entity. For example, /summon Pig ~ ~ ~ {Saddle:1,CustomName:"Mr. Pig",CustomNameVisible:1} would create a saddled pig named Mr. Pig at the player's current location.
|
x and z must fall within the range -30,000,000 to 30,000,000 (exclusive), and y must be at least 0. If coordinates aren't specified the entity will spawn at the player's location (or inside a command block if the command was executed by one). |
tellraw <spelernaam> <raw bericht> | Sends a message to a specified player, or to every player online on a server. Links can also be sent, with customizable actions when they are clicked, for example giving an apple to a player or teleporting the player to another location. This command can also be used to fake player messages.
raw message uses JSON. Here is a useful tool to help create messages with JSON. Note that in the game, color will default to white if not given and all formatting (bold, italic, etc.) will default to false if not given, so you don't have to use the exact command the tool gives you. |
playername must be online, and the message text must be correctly coded in JSON. |
testforblock <x> <y> <z> <tilename> [datavalue] [dataTag] | Used to test whether a particular block is in the x, y and z coordinates specified. | tilename must exist, datavalue must exist if specified, and dataTag must evaluate if specified. |
time set <nummer | day | night> | Sets the world time. number is an integer between 0 and 24000, inclusive, where 0 is dawn, 6000 midday, 12000 dusk and 18000 midnight. Number can be greater than 24000; in this case, the the time of day wraps around, but the moon's phase is advanced. However, Setting the time "backward" (earlier than the current time) does not change the moon. "time set day" sets the time to 1000, and "time set night" sets the time to 13000. | Number must be 0 or positive, or "day" or "night". |
time add <nummer> | Increments the world time, as above. | Number must be 0 or positive. The daytime wraps, and the moon's phase advances; adding 24000 will advance the moon's phase by one day. |
toggledownfall | Toggles rain and snow. | Always succeeds. |
tp [spelernaam] <targetplayer> | Teleports player playername to targetplayer 's location. If no player is specified, it will teleport yourself. | Playername is not optional in command blocks. Both players must be online. |
tp [playername] <x> <y> <z> | Teleports player playername (or yourself if no player is specified) to coordinates x,y,z. (the y value cannot be smaller than 0). Can also relatively move the player by adding the ~ character before the coordinate value. For example typing /tp John ~3 64 ~3 will teleport a player called John 3 blocks away from his current x and z, and to y 64. | x and z must fall within the range -30,000,000 to 30,000,000 (exclusive), and y must be at least 0. Playername is not optional in command blocks, and the player must be online. |
weather (clear | rain | thunder) [seconds] | Changes the weather for the specified duration. | Seconds must be at least 1, and cannot be greater than 1000000, and a valid weather condition must be provided. |
xp <amount> [playername] | Gives the specified user the given number of orbs. Maximum is 2,147,483,647 per command. Negative amounts may not be used to remove experience points. | Amount can be at most 2,147,483,647. Playername is not optional in command blocks, and player must be online. |
xp <amount>L [playername] | Gives playername the amount number of experience levels. Maximum is 2,147,483,647 — if a player is given levels pushing them past this limit, they get reset to 0. Negative amounts may be used to remove experience levels. | Amount must be between -2,147,483,648 and 2,147,483,647, inclusive. Playername is not optional in command blocks, and player must be online. |
Multiplayeropdrachten[]
These commands are usable by ops (operators) from the server console as well as through the chat window when prefixed by the command character (a forward slash). These commands are only available in SMP. With the exception of the list command, none of these commands can be executed by a command block, and none make use of target selectors. Many of these commands can be used on players who have never been to the server, or even on names which are not (or cannot be) registered as Minecraft accounts.
Command | Description | Success Conditions |
---|---|---|
ban <playername> [reason] | Blacklists the name playername from the server so that they can no longer connect. Note: Bans supersede any whitelisting in place. | Always succeeds. |
ban-ip ip-address | playername | Blacklists an IP address so that all subsequent connections from it are rejected. | ip-address must be valid or playername must be online. |
banlist [ips] | Displays banned players. To display banned IP addresses, use the command "banlist ips" | Always succeeds. |
deop <playername> | Revokes a player's operator status. | Always succeeds. |
kick <playername> [reason] | Forcibly disconnects playername from the server, displaying an optional reason to them. | Playername must be online. |
list | Shows the names of all currently-connected players (the same can be achieved when pressing tab) | Always succeeds, even in a command block. |
op <playername> | Grants playername operator status on the server. | Always succeeds. |
pardon <playername> | Removes playername from the blacklist, allowing them to connect again. | Always succeeds. |
pardon-ip <ip-address> | Removes ip-address from the IP blacklist, allowing players from that IP address to connect to the server. | ip-address must be valid. |
save-all | Forces the server to write all pending changes to the world to disk. | Always succeeds. |
save-off | Disables the server writing to the world files. All changes will temporarily be queued. | Always succeeds. |
save-on | Enables the server writing to the world files. This is the default behavior. | Always succeeds. |
setidletimeout <Minutes until kick> | Set the idle kick timer. Any players idle for Minutes until kick will be kicked. | Always succeeds. |
stop | Gracefully shuts down the server. | Always succeeds. |
whitelist <add | remove> <playername> | Adds or removes playername from the whitelist. | Always succeeds. |
whitelist list | Displays all players in the whitelist. | Always succeeds. |
whitelist <on | off> | Enables/disables the server's use of a whitelist. Note: Server ops will always be able to connect when the whitelist is active, even if their names do not appear in the whitelist. | Always succeeds. |
whitelist reload | Reloads the list of playernames in white-list.txt from disk (used when white-list.txt has been modified outside of Minecraft). | Always succeeds. |
Opdrachten van opdrachtblok[]
These commands can be used only in a Command Block and cannot be used in other ways. Command blocks kun je alleen krijgen door /give <jouwspelernaam> command_block
te typen.
Command | Description | Success Conditions |
---|---|---|
testfor <playername | selector> | Used to test whether playername is online, or if selector has matches. A Redstone Comparator as output from a command block with this command will indicate the number of players matched by selector. For example, "testfor @a[r=3]" will output the number of players within 3 meters of the command block. More information about selectors may be found here. | selector must be valid if specified. |
Datagegevens[]
As of 13w36a, NBT tags can be specified for items and entities created with the /give
, /summon
and other commands. Data tags are data structures. The format is JSON, although it is not strict (lenient). The data is represented as a comma separated list of pairs. Each pair has the format <key>:<value>
. The key is the name of the NBT tag and the value is the data that should be assigned to it. The value can be different types:
- String is a piece of text, can be wrapped with double-quotes. Double quotes have to be used if the String contains commas, curly braces or square brackets. To use double-quotes inside Strings, the quote is escaped by a backslash (
\"
). When using the summon command, escaping is disabled (except for double quotes) and keys must not be quoted (probably a bug [1]). This causes an issue where trailing backslashes do not work (as do any other things that need to be escaped), even when escaped properly. The reason is that it escapes the quotation mark after the string which causes a malformed JSON object.Voorbeeld:"My name is \"Steve\""
- Number are 1 or more digits that can have a leading sign (
+
/-
). They're classified in Integers, that don't have a decimal mark, Doubles, that uses a dot (.
) as a decimal mark, and Floats, that also havef
appended after the number. Examples:integer:-128
;double:-1.2345
; &float:1.2f
- Array (or 'List') is multiple, comma separated values wrapped with square brackets. The containing values do not need to be of the same type.
Voorbeeld:[1,2,3]
- Boolean can either be
true
orfalse
, but using Numbers works, too. When using numbers, everything between 0 and below 1 is false, other is true.Voorbeeld:true
- Hash or 'Object' is a container for data structures (as explained above). They are wrapped with curly braces. Notice: The Data tag itself is a Hash. Voorbeeld:
{Health: 18, CustomName: "Friend"}
- null This is a placeholder an empty value. Do not put quotes.
Voorbeeld:null
Tag names are case-sensitive, and whitespace outside keys or values is ignored.
See Command NBT Tags see the full amount of dataTags that can be added to the commands /give
and /summon
.
Video[]
Geschiedenis[]
Officiële release | ||||
---|---|---|---|---|
1.3.1 | 12w16a | Valsspeelmodus geïntroduceerd./kill werkt nu in Creative. | ||
12w22a | Opdracht "defaultgamemode" was toegevoegd. | |||
12w24a | Opdracht "publish" was toegevoegd. | |||
12w25a | Cheats could be turned on or off when opening a world to other players through LAN. | |||
12w27a | Opdracht "debug" was toegevoegd. | |||
1.4.2 | 12w32a | Opdrachten "difficulty," "gamerule," "spawnpoint," en "weather" waren toegevoegd. | ||
12w37a | Opdracht "clear" was toegevoegd. | |||
12w38a | /clear can now be used to remove specific blocks/items. | |||
12w41a | Het limiet voor /xp is nu 2.147.483.647 in plaats van 5.000. | |||
1.4.4pre | Opdracht "enchant" was toegevoegd. | |||
1.5 | 13w03a | The "testfor" command was added. It works only for command blocks. | ||
13w04a | Het "scoreboard" was toegevoegd. | |||
13w09b | Opdracht "effect" was toegevoegd. | |||
1.6 | 13w23a | The "spreadplayers" command was added. | ||
New gamerule "naturalRegeneration" was added. | ||||
13w24a | Nieuwe spelregel "doDaylightCycle" was toegevoegd. | |||
1.6pre | "clear" was aan de opdracht "effect" toegevoegd. | |||
1.6.1pre | Opdracht "playsound" was toegevoegd. | |||
1.7.2 | 13w36a | Opdracht "summon" was toegevoegd. You can now put NBT tags in /give and /summon. | ||
13w37a | Opdracht "setblock" was toegevoegd. When the 'x', 'y' and 'z' coordinates of the block are provided you can replace or destroy a block. | |||
Opdracht "tellraw" was toegevoegd. You can create chat messages with custom links when a button is pressed. | ||||
Opdracht "testforblock" was toegevoegd. Opdrachtblokken kunnen detecteren of er blokken worden geplaatst en een comparator output geven. | ||||
13w38a | Opdracht "setidletimeout" was toegevoegd. It automatically kicks idle players after the idle time specified in the command. This command is for multiplayer-only, and can be used only by server operators. | |||
13w43a | Opdracht "setworldspawn" was toegevoegd. Stelt een nieuw spawnpunt in voor alle spelers, zelfs als deze nog nooit op de server zijn geweest of offline zijn. Overschrijft geen bedden. |
Problemen[]
Problemen met betrekking tot 'Opdrachten' worden bijgehouden op de bugtracker. Meld problemen daar.
Zie ook[]
- Formatting codes
- Multiplayer