TransWikia.com

How can I prevent players from having a specific item in their inventory?

Arqade Asked on May 20, 2021

My brother has a problem with hooking people with fishing rods instead of focusing on survival. I know about the /clear command, but command blocks are only active when the chunk they’re in is loaded, and I’m afraid that he’ll go past that to get a fishing rod and start it up again. Since Minecraft is basically infinite, I can’t keep placing command blocks whenever he moves away from one.

Is there a mod, command, etc. that can outright prohibit certain items from players’ inventories no matter where they are in Minecraft?

2 Answers

You don't need mods. Spawn chunks are always loaded, put your command block there.

Correct answer by HolyBlackCat on May 20, 2021

Alternate Method: Use a datapack to run the /clear command. This works since datapack functions are always loaded, no matter where you are in the world. You can just reference a function in the minecraft function tag tick, and in the function add

clear <selector> <item> <count>

This will always clear x item(s), from y player(s), no matter where you are.

Answered by randomuser922 on May 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP