6

I'm trying to get started using command blocks. I can't seem to figure out how to do basic things, such as changing game modes, sending messages, and giving items to people using the block ID. Nothing I have tried is working.

How do I use command blocks?

  • What exactly are you trying, that isn't working? – Coronus Sep 30 '13 at 21:12
  • 2
    You may be using a forward slash (/)in front of your commands, like you do in chat. You should remove this when using command blocks. – Timtech Sep 30 '13 at 21:18
  • 1
    @Timtech, you could remove the /, but it's not necessary to do so and does not stop it from working if you leave it in. – SirBenet Oct 2 '13 at 15:33
8

You can use them as you would use a regular command in chat.

Example:

  • /give [user] 1 2

This gives [user] two of item id 1 when the command block is activated with redstone.

  • /gamemode [user] [0, 1, 2]

This will change [user]'s gamemode to either 0 (Survival) 1 (Creative) or 2 (Adventure)

Note and Edit: Buttons S (Survival) C (Creative) and A (Adventure) work as well as SevenSidedDie has noted for /gamemode

  • 1
    Note that /gamemode also accepts [s, c, a], which make it easier to avoid mistakes than using the number codes. – SevenSidedDie Sep 30 '13 at 22:35
  • 1
    @SevenSidedDie Thanks! I have updated the answer to make it better – Baked Potato Oct 1 '13 at 1:05
  • And remember to supply it with redstone power – Jacky Xie Aug 9 '15 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.