Command Book

From Mine Blocks Wiki
Revision as of 13:48, 18 February 2019 by TheTopazRobot (talk | contribs)
Jump to navigation Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!



Command Book
Command book.png
Type:Creative Utility
Stackable:No
Found naturally:No
Renewable:No
Identifier:command_book

The command book is an item that can only be summoned with commands, and issues commands when the player holds the book and shift-clicks.

Obtaining

The command book can only be obtained using the /give command.

The command that the command book will run is specified when it is obtained, using the command data tag. This can be set to any command possible in the regular command menu. The uses data tag specifies how many times the command book can be used before it disappears. The name data tag can also be used on command books.

For example, the command /give command_book 1 0 {name:"Carrot Book", command:"/give carrot 10", uses:10} gives a command book named "Carrot Book" which gives ten carrots when used and can be used twice before disappearing.

Usage

The command book can be used to help make adventure maps easier to navigate and give players required resources, without the map player needing to type commands.

It also allows for faster command usage when using the same command repetitively, as the player does not need to open the command menu over and over again, and can just shift click the command book.

Running Commands

The command book can be used by shift clicking with it while holding it in the hand. This executes its command.

If the command book has been set a limited number of uses, this adds one use to its count. Once it is used the maximum specified number of times, it disappears. If a specific number of uses has not been set, the command book can be used an unlimited number of times.

Data Tags

Main article: Data tags

Tag Name Description Values
name Overrides the default naming of the item (as if it was renamed by an anvil) String

Name of the command book

command Specifies the command run by a command book. String

Command will not be checked for errors upon creation.

uses Specifies how many times a command book can be used before it disappears. Integer

Non-positive numbers are invalid.

History

Version Date Changes
1.28 Oct 8, 2016
  • Added the command book

See Also