Restrict access to certain actions in certain areas?

Restrict access to certain actions in certain areas? - Leather couches placed in empty room under bright striped barrier tape during renovation process

I have an adventure map in the making, being the reason for the many questions all of a sudden, and I ran into an issue. The player chooses a kit from a starting point, but I do not want the player to be able to drop any of the items they get, or use any items they receive until they are in the arena. Is there a way to disable certain actions in an area without using something like WorldGuard?



Best Answer

Not sure if this will help, but check out this video..

The above link essentially tells you to detect a dropped item, kill it, and then replace it.

If that didn't work, I remember an old solution, but I'm not sure if it still works. Using the PickUpDelay tag, you can make it so players instantly get their items back. I think running this on a fast clock may work. WARNING I'm not sure if it works and it may lag you out.

/execute @e[type=Item,r=5] ~ ~ ~ /entitydata @e[type=Item,r=5] {PickupDelay:0s,Fire:-1s,Age:0s}

The second tags inside of the curly brackets seem to need to be included for the command to work successfully

If the above command does not work, try changing the "0" to something else.




Pictures about "Restrict access to certain actions in certain areas?"

Restrict access to certain actions in certain areas? - Warning for dogs owners during coronavirus pandemic in park
Restrict access to certain actions in certain areas? - Woman walking through turnstile in subway
Restrict access to certain actions in certain areas? - No Parking sign on wall





Learn how to restrict access to certain fields in PracticeMaster




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Skylar Kang, Joshua Miranda, Tim Douglas, Erik Mclean