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?

3
  • What exactly are you trying, that isn't working?
    – Coronus
    Sep 30, 2013 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, 2013 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, 2013 at 15:33

1 Answer 1

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .