I am trying to make commmand blocks that clear my players inventories of unobtainable blocks. I am trying to do tile.moving_block.name at the moment because that can be used for the horion commandblockexploit. I have tried /clear @a[tag=!staff] tile.moving_block.name but it doesn't work.

1 Answer 1


It’s actually pretty simple; you can easily put this command in a repeating command block:

clear @a unobtainable_block_name

Unfortunately you will have to do this for each individual block.

I’m guessing you are doing this for a realm/server. If this is the case I’d highly recommend the above command for beehives too as well, and I'd also kick cheating players out of the server automatically with this:

kick @a [name=!moderator_username, m=creative] IMAGINE HACKING

This will kick all players who are in creative and not a moderator

  • It should be impossible to go into creative without moderator power. Aside from that, the kick command only really works if you have a single moderator at anytime, since if you add two commands like that with two different names, anyone in creative will be kicked.
    – BunnyMerz
    Jun 25 at 18:12
  • This doesnt work because minecraft thinks the unobtainable block names dont exist (as they shouldnt) and doesnt clear them. Kicking also doesnt work with indicators such as @a @e etc
    – noahhhha
    Jun 25 at 18:18
  • If you have two moderators you simply do kick @a [name=!moderator_username, name=!2nd_moderator_username, m=creative] IMAGINE HACKING Jun 28 at 5:06

You must log in to answer this question.

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