Minecraft – What’s the best way to restrict gamemode per-world in MultiWorld

minecraft-bukkitminecraft-java-editionminecraft-java-edition-serverminecraft-spigot

I have a MultiWorld server set up (Spigot 1.8 using the MultiWorld plugin) which I would like to have some worlds lock everyone into creative mode and others lock everyone into survival mode. I've been unable to figure out how to get it to do this. Setting the defaultmode only seems to affect your initial login. Setting the CreativeMode flag on a world in the MutliWorld settings doesn't seem to have any effect for me.

I've tried a couple plugins that claim to force gamemode but haven't succeeded in getting them to work. The most-closely-matched with my intended purpose seems to be GameModeChanger_Rewrite, but it seems to change your gamemode based on the settings for the world you just left instead of the world you're going to when you move between worlds.

I'd be grateful for suggestions how to set this up! Thanks!

Best Answer

Make a commandblock loop which for every world sets the gamemode

use this command

gamemode @a X

for X you can ether fill in 0 for survival, 1 for creative, 2 for adventure, and 3 for spectator.

here is how a loop is made: you can put an lever on it to turn it on and off easely. enter image description here

download testworld here