Minecraft – How to non-op use items in spawn

minecraft-java-editionminecraft-java-edition-serverserver-administration

I'm starting to setup a server, me and a few friends are making a little decent spawn, were we don't want to have anyone that joins place/destroy blocks. I even disabled mobGriefing so that people can't lure creepers to destroy stuff.

However, I'd like them to be abble to use chests, ender chests and enchantment table, but without them to be abble to place/destroy blocks. Is there any way? I'm using bukkit, and the only plugin I have is FirstJoinPlus.

Best Answer

You can change their game mode to adventure mode. If a player is in adventure mode, they can't break blocks but can interact with wooden doors, buttons, chests, etc. The command to set a player's game mode to adventure is /gamemode a username, where username is a target selector or player's username.

Here's how you could have only certain people in adventure mode.

  1. Create an infinite redstone loop with a command block. Video Tutorial (use a command block instead of a piston).

  2. Let's pretend you want everyone except Bob and Joe to be on adventure mode. You would enter this command into the command block. /gamemode a @a[name=!Bob,name=!Joe]. Bob and Joe would be the only players to not be in adventure mode.

  3. You can edit the command at any time to add more people to the list. Just make sure you put an exclamation point before their username. Good luck!