User:ItsPlantseed/sound definitions

Education Edition commands
List of Education Edition commands, some information were taken from Code Connection API.pdf.

ability
Grants or revokes player with a specific ability.


 * Syntax




 * Arguments


 * player: target
 * Specifies the target to grant/revoke player ability. Must be a player name or target selector.


 * ability: string
 * Specifies the player ability.
 * Must be one of:
 * for ability to become a World Builder.
 * for ability to fly.


 * value: bool
 * Specifies the value to set the ability to, must in between  or.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, grants/revokes the player ability into the specified ability.

classroommode

 * Syntax



clearfixedinv
Clears fixed inventory slots.


 * Syntax




 * Result


 * Fails if there are no fixed inventory slots available.
 * On success, fixed inventory slots cleared successfully.

code
Used to access Code Connection.


 * Syntax




 * Result


 * Fails if there is no Code Connection installed.
 * On success, Code Connection connected successfully.

executeasother
Executes another command as the specified target.


 * Syntax




 * Arguments


 * origin: target
 * Specifies the target to be the command's executor. Must be a player name or target selector. If more than one entity is selected, the command will be run once as each of them.


 * position: x y z
 * Specifies the position from which to run the command. x and z must be within the range -30,000,000 to 30,000,000 (inclusive). Coordinates specified with tilde notation are relative to the target, not to the position of the command's execution.


 * command: string
 * Specifies the command to be run. Must be a valid command.


 * Result


 * Fails if ...
 * On success, ...

executeasself

 * Syntax




 * Arguments


 * command: rawText
 * Specifies the command to be run. Must be a valid command.


 * Result


 * Fails if ...
 * On success, ...

getchunkdata (hidden)

 * Syntax



getchunks (hidden)

 * Syntax



geteduclientinfo (hidden)

 * Syntax



getspawnpoint

 * Syntax




 * Arguments


 * player: target
 * Specifies the target to get the player spawn point. Must be a player name or target selector.


 * Result


 * Fails if ...
 * On success, ...

globalpause (hidden)
Pauses the server world.


 * Syntax




 * Arguments


 * isPaused: bool
 * Specifies the value to pause the world, must in between  or.


 * Result


 * Fails if ...
 * On success, ...

immutableworld
Toggles the world to be able altered or cannot be altered.


 * Syntax




 * Arguments


 * value: bool (optional)
 * Specifies the value to set the world to be able altered, must in between  or.


 * Result


 * Fails if ...
 * On success, if  the world cannot be altered, but doors, levers, etc. can still be used, and vice versa if set to.

position
Toggles player coordinates to be displayed on the HUD.


 * Syntax




 * Result


 * Always success, coordinates displayed on the HUD succesfully.

querytarget (hidden)

 * Syntax




 * Arguments


 * victim: target
 * Specifies the targets. Must be one or more player names and/or [#Target selectors|target selectors] separated by spaces ( is permitted to target entities other than players).


 * Result


 * Fails if ...
 * On success, ...

setfixedinvslot
Sets fixed inventory slot with a specific item.


 * Syntax




 * Arguments


 * fixedinvslotnum: int
 * Specifies the number of fixed inventory slot.


 * itemName: string
 * Specifies the item for the fixed slot. Must be a valid item id (for example, ), or block id for which items exist.


 * data: int (optional)
 * Specifies the item data of the item. Must be an integer between -2,147,483,648 and 2,147,483,647 (inclusive, without the commas), but values which are invalid for the specified item id revert to 0. If not specified, defaults to 0.


 * Result


 * Fails if arguments are not specified correctly.
 * On success, players are given the specified items in the fixed inventory slot.

setfixedinvslots
Sets the amount of fixed inventory slots.


 * Syntax




 * Arguments


 * fixedinvslotnum: int
 * Specifies the amount of fixed inventory slots, up into three slots.


 * Result


 * Fails if the argument is empty, or not specified correctly.
 * On success, players grant fixed slots with the specified amount.

worldbuilder
Toggles the World Builder ability to enable or disable alternately.


 * Syntax






 * Result


 * Fails if the player does not have permission to become a World Builder.
 * On success, player switch the World Builder ability alternately.

move
Moves Agent in specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to move.
 * Must be one of:
 * to move Agent forward.
 * to move Agent backward.
 * to move Agent leftward.
 * to move Agent rightward.
 * to move Agent upward.
 * to move Agent downward.


 * Result


 * Fails if the specified direction is blocked by a block.
 * On success, Agent moved in the direction specified by one block.

turn
Rotate Agent in the specified direction by 90 degrees.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to rotate.
 * Must be one of:
 * to rotate Agent leftward.
 * to rotate Agent rightward.


 * Result


 * Always success, Agent rotate in the specified direction as expected.

attack
Attacks in the direction specified.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to attack.
 * Must be one of:
 * to attack forward.
 * to attack backward.
 * to attack leftward.
 * to attack rightward.
 * to attack upward.
 * to attack downward.


 * Result


 * Always success, Agent attacks in the specified direction by attack damage.

destroy
Destroys block or item in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to destroy.
 * Must be one of:
 * to destroy block/item on the front.
 * to destroy block/item on the back.
 * to destroy block/item on the left-hand side.
 * to destroy block/item on the right-hand side.
 * to destroy block/item on the top-hand side.
 * to destroy block/item on the bottom-hand side.


 * Result


 * Fails if the block was unbreakable or a non-solid block.
 * On success, Agent destroys the block/item by one hit as expected.

drop
Drops the given number of items from the specified inventory slot onto the ground by one block in the specified direction.


 * Syntax




 * Arguments


 * slotNum: int
 * Specifies the slot number to drop, slots are numbered from 1 to 27.


 * quantity: int
 * Specifies the number of items to be dropped from the Agent's inventory slot. Must be between 1 and 64.


 * direction: string
 * Specifies the direction of Agent to drop the item(s).
 * Must be one of:
 * to drop item(s) to the front.
 * to drop item(s) to the back.
 * to drop item(s) to the left.
 * to drop item(s) to the right.


 * Result


 * Fails if the arguments are not specified correctly or the slot was empty.
 * On success, returns if items were dropped onto the ground in the direction specified.

dropall
Drops all items from all slots onto the ground by one block in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to drop all the items.
 * Must be one of:
 * to drop items to the front.
 * to drop items to the back.
 * to drop items to the left.
 * to drop items to the right.


 * Result


 * Fails if the arguments are not specified correctly or the Agent's inventory was empty.
 * On success, returns if all items were dropped onto the ground in the direction specified.

inspect
Returns the name of the block in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to verify the name of the block.
 * Must be one of:
 * to inspect the block on the front.
 * to inspect the block on the back.
 * to inspect the block on the left-hand side.
 * to inpect the block on the right-hand side.
 * to inspect the block on the top-hand side.
 * to inspect the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns the form of the block in the specified direction. See block id for the complete list.

inspectdata
Returns the data value of the block in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to verify the data value of the block.
 * Must be one of:
 * to inspect the block on the front.
 * to inspect the block on the back.
 * to inspect the block on the left-hand side.
 * to inpect the block on the right-hand side.
 * to inspect the block on the top-hand side.
 * to inspect the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns the data value of the block in the specified direction. See block id for the complete list.

detect
Detects if there is a collidable block in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to detect a collidable block.
 * Must be one of:
 * to detect the block on the front.
 * to detect the block on the back.
 * to detect the block on the left-hand side.
 * to detect the block on the right-hand side.
 * to detect the block on the top-hand side.
 * to detect the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns if there was a collidable block in the specified direction.

detectredstone
Detects redstone signal in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to detect a redstone signal.
 * Must be one of:
 * to detect the block on the front.
 * to detect the block on the back.
 * to detect the block on the left-hand side.
 * to detect the block on the right-hand side.
 * to detect the block on the top-hand side.
 * to detect the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns if the object in the specified direction received a redstone signal at that moment.

transfer
Transfers specified quantity of items from the selected slot to another specified slot of Agent's inventory.


 * Syntax




 * Arguments


 * srcSlotNum: int
 * Specifies the source of slot number to be transferred, slots are numbered from 1 to 27.


 * quantity: int
 * Specifies the number of items to be transferred from the Agent's inventory slot.


 * srcSlotNum: int
 * Specifies the destination of slot number to be transferred, slots are numbered from 1 to 27.


 * Result


 * Fails if the arguments are not specified correctly, or returns false if the destination already has items of a different type, and if the source slot was empty.
 * On success, returns true if there was a room for the items to be transferred.

createagent
Creates Agent on the current player position.


 * Syntax




 * Result


 * Always success, Agent created succesfully.

tpagent
Teleport player to the Agent's position.


 * Syntax




 * Result


 * Fails if there is no Agent existed.
 * On success, player teleported to Agent successfully.

tptoplayer
Teleport Agent to the player's position.


 * Syntax




 * Result


 * Fails if there is no Agent existed.
 * On success, Agent teleported to player successfully.

collect
Collects all items within a one block from Agent in three dimensions.


 * Syntax




 * Arguments


 * Specifies the item to be collected on the block to the Agent's inventory. Must be an item id, or a block id for which an item exists (for example, ).


 * Result


 * Fails if the arguments are not specified correctly or no items of the same name were collected.
 * On success, returns if any items of the same name were collected.

till
Tills grass in the specified direction.


 * Syntax




 * Arguments


 * direction: string
 * Specifies the direction of Agent to till the block.
 * Must be one of:
 * to till the block on the front.
 * to till the block on the back.
 * to till the block on the left-hand side.
 * to till the block on the right-hand side.
 * to till the block on the top-hand side.
 * to till the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly or there is no till-able block in the specified direction.
 * On success, returns if any till-able block was turned into farmland in the specified direction.

place
Right-clicks on the block in the specified direction.


 * Syntax




 * Arguments


 * slotNum: int
 * Specifies the slot number of block to be placed, slots are numbered from 1 to 27.


 * direction: string
 * Specifies the direction of Agent to place the block.
 * Must be one of:
 * to place the block on the front.
 * to place the block on the back.
 * to place the block on the left-hand side.
 * to place the block on the right-hand side.
 * to place the block on the top-hand side.
 * to place the block on the bottom-hand side.


 * Result


 * Fails if the arguments are not specified correctly or the specified slot was empty.
 * On success, returns if a block in the specified inventory slot was placed.


 * Note


 * This basically places a block (ex: Place Stone Block) or a placeable item (ex: Place Oak Fence) from the selected inventory slot in the specified direction.
 * However, this doesn’t interact with things like doors, levers, and containers.
 * Additionally, when player specifies a slot which contains the following non-place-able items, this behaves as follows:
 * Place water/lava
 * Bucket
 * Till grass
 * Hoe
 * Make a path
 * Shovel
 * Spawn a mob
 * Spawn Eggs
 * Dye something
 * Dyes
 * Make a fire
 * Flint and Steel
 * Fire Charge
 * Placeable material
 * Boat
 * Minecart
 * Bottle

getitemcount
Returns the number of items in the specified slot, as in how many the player could use before it would be empty.


 * Syntax




 * Arguments


 * slotNum: int
 * Specifies the slot number of items to be counted, slots are numbered from 1 to 27.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns the number of item in the specified slot. See block ids for the complete list.

getitemspace
Returns the number of spaces remaining in the specified slot, as in the number of items you could add before it would be full.


 * Syntax




 * Arguments


 * slotNum: int
 * Specifies the slot number of items to be counted, slots are numbered from 1 to 27.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns the remaining number of the item in the specified slot.

getitemdetail
Returns the name of the item in the specified slot.


 * Syntax




 * Arguments


 * slotNum: int
 * Specifies the slot number of items to be counted, slots are numbered from 1 to 27.


 * Result


 * Fails if the arguments are not specified correctly.
 * On success, returns the form of the item in the specified slot. See block id for the complete list.