WorldGuard

WorldGuard

8M Downloads

Security setting for gamemode to be changed back to '0' if =true

LadyCailinBot opened this issue ยท 7 comments

commented

WORLDGUARD-2934 - Reported by razorskills

We have had some issues where players were give op, or creative mode(or they gave themselves creative mode before they were deoped). Then the player logs out, and I find out that a player was in creative mode for half a month and told no one. In the config, there is already an option to deop players upon joining the server. I absolutely love this feature. It is helping our normal admins to play the game more and not be too lazy to change their gamemode back to normal.

Only problem with that is if they left themselves in creative mode, they cannot switch back without either being opped or oping themselves. I understand this is could be argued to not be lazy and hound after people. And have myself the owner keep an eye out all the time. But with a feature like this, I can relax and not be checking regularly what mode people are in. It does not happen that often. but when it does, somebody has made a bedrock fortress somewhere and set their home inside it.

commented

Comment by razorskills

Well. That is a good setting to have, but it does not change someones game mode from creative or creative + back to survival upon joining the server..

I just tried it now and it does not work with my current setup. I am using MCPC+ Build 150 for 1.6.4

Il test it on a bukkit only server and see if it is something mcpc+ needs to fix.

commented

Comment by sk89q

Changing from Creative+ to another mode would require special logic targeted towards NEI probably, since NEI treats it in a special way if I recall.

commented

Comment by razorskills

well, if you are not opped, it will change you to creative regular. But reopped it will bring you back to C+ so im not sure if it would work if the player was deopped.

But I talked to the guys at mcpc+ and they pointed to a outside plugin. Called moddamage for now.

Under login event:

  • 'if player_name = "<players name":
  • 'command.console': '/gamemode 0'

Basically wouldn't it just notice if you are not in gamemode 0, then change you to it. If you are using c+ it isn't gamemode 0. so It should theoretically not need much special treatment right?

commented

Comment by sk89q

Well, normally we'd call the Bukkit method on the player (player.setGameMode()) rather than execute a console command. From my experience on MC 1.5, this didn't trigger NEI to exit Creative+.

It is possible, however, to just 'blindly' call the console command and hope NEI somehow catches it, but because plugins can change the format and syntax of the command, calling the console command presents its own problems.

commented

Comment by sk89q

Closing this issue due to age. If someone is still interested in this issue, please make a new one or ask this one to be re-opened.

commented

Comment by razorskills

Also I wanted to mention, if they were deoped upon joining, and then had to op themselves to change the gamemode. it is kind of counter productive.

commented

Comment by highfaller2012

There's an option for this in server.properties

Set "gamemode=" to "gamemode=0"

and

Set "force-gamemode=" to "force-gamemode=true"