DefaultGameMode
Description
This is a very lean plugin that will allow you to set the game mode for any world on your server.
NOTICE:
My Worlds and Multiverse include this functionality. If you would like me to continue maintenance, please post below.
Summary
Minecraft 1.8 came with the ability to set your server as a creative or survival server, using the server.properties file. However, it does not allow you to have one creative world and one survival world. DefaultGameMode allows you to do just that. Using config.yml, you can specify a game mode (creative or survival) for each of your worlds. You do not have to specify one for every world. If you leave one out, it will default to the gamemode setting found in your server.properties file. All settings apply globally, to all players.
Permissions is never used to determine anyone's game mode. This plugin is designed use as little processing and memory as possible. It is not meant to be feature filled, but to allow you to quickly have creative and survival worlds. It does not generate or load multiple worlds. You will need another plugin to do that. DefaultGameMode does not inhibit the use of /gamemode [username] [0/1]
.
Commands
/dgmtest
- Debug info. Right now, it just tells you whether debug mode is enabled (see debug
in configuration below).
Configuration
The following config.yml is automatically generated if the plugin cannot find it (like when you run it for the first time). It includes an explanation on how configuration works, and it sets "world" and "world_nether" to survival mode.
config.yml
Quote:# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DefaultGameMode Configuration # # # # This file can be found inside DefaultGameMode.jar with the default # # settings. You can also simply delete this file and reload the server to # # regenerate the default settings. If you haven't edited this file yet, # # the default settings are already here. # # # # Key Values Description # # ----------------------------------------------------------------------- # # debug true If set to true, server console will spit # # false out information that is useful for figuring # # out why the plugin isn't working for you. # # (Hint: it's probably because of a mistake # # in this file!) Default setting: false # # # # modes (none) There is no apparent value. This goes above # # the list of world names. # # # # (world name) survival You must have the name of each world that # # creative you want the plugin to work on. It must be # # below "modes:" and be indented. Put the # # game mode as the value. If you leave out a # # world, the plugin will default to the # # setting found in "server.properties" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # debug: false modes: world: survival world_nether: survival
All you need for the plugin to work is…
modes: [world name]: [game mode]
[world name]
is the name of a world, and [game mode]
is either creative
or survival
. The debug
setting is not necessary; it will default to false
. If you set it to true
, the plugin with spit out useful information to the console. This is intended to help you figure out why your configuration might not be working.
Once again…
You do not have to specify a game mode for each world. If you leave one out, it will default to the gamemode setting found in your server.properties file. All settings apply globally, to all players.
Permissions
None yet.
Version Stuff:
- v 1.1
- Update to CB 1.1-R4
- v 1.0
- Initial Release
Plans
I'm planning on discontinuing this plugin since My Worlds and Multiverse include this functionality. If you would like me to continue updating, please post below.
- Add permissions node for special players who are exempt from all game mode settings. For example, to allow them to switch between worlds and stay in creative mode.
- Add a command to toggle this in-game.
- Possibly remove the
/dgmtest
command.
History
v 1.0 - Initial release
@toby000
Does it break with 1.2.4?
any predictions for update this plugin to 1.2.4? This plugin is really AWESOME and is the simplest and most effective I've found, because it has support for multiple worlds ... please update, we thank you!
@musicin3d
Yes, it works, i chanced the thinks now, and it works fine! Thanks!
@musicin3d
I do not have a big server, so there are no players online now. I don't like the commands, I don't know why, i yust do'nt really understand :) But thanks for all the help! in the worlds file you really can set verry nice thinks, like no snow I really hated it that it does not work, but now I know it works! Thanks!
@samuelvisser
Yes, you could do that, or your could avoid frustrating your players and just use the commands. *hint* ;)
@musicin3d
O, yes i'm editing the worlds file while the server is running! so, if I stop the server, edit what I like, and then start the server it will work?
@samuelvisser
So, you have two options to fix this...
1. Use the commands (recommended)
2. Stop the server before editing the worlds file
@samuelvisser
Ah. Ok, the problem is: your editing your worlds file while the server is running.
My Worlds has in-game commands to make configuration easier, so you don't have to mess with the worlds file at all. The commands are pretty english-like too, so they're really easy to remember. :)
But, because the configuration can be changed in the game, the plugin has to save it's settings when the server stops. Otherwise, any changes made with the commands would be lost! :( You see the problem now?
If you edit the worlds file while the server is running, the plugin will overwrite it when the server stops. Aaaaand, it will overwrite it with whatever settings is has in memory. In your case they're the settings that were there when the server started, because you didn't change them in the game.
Does that make sense?
@musicin3d i'm also using my worlds, but every time I chance something in the 'worlds'' file, it will be set to default if i restart my server
i'm also using my worlds, but every time I chance something in the 'worlds'' file, it will be set to default if i restart my server
@samuelvisser
What problems are you having with My Worlds? I actually use it instead of my plugin now.
Also, DefaultGameMode 1.1 should work with R6. I'll take another look at it just to be sure.
could you please update this plugin? by my worlds it's not working and I don't like Multiverse This is a really good plugin, keep updating, please!
@dattguyy
Please PM me your config file and the debug console output.
I'm having a problem where my extra world that was created using multiverse is not effected by the plugin. All three worlds: normal, nether, end work fine but my extra normal world is defined as "invalid world" in the defaultgamemode's debug console. Is this a problem with defaultgamemode or is it a problem with multiverse.
@Calman102
… What problem? I don't develop AutoGameMode. So if you have a problem with that plugin, you need to talk to that developer.
I am having the 'autogamemode' problem with this plugin. When will the next version be out because I really need this fixed!
Yep, you're right. It just does what you'd expect. Your welcome, and thank you! :D
@musicin3d
Oh sorry if I wasn't clear XP
What I do mean is that Autogamemode requires a re-log for the gamemode to switch. So for example:
That's basically what happens, it will only change your gamemode if you re-log, but I want people to warp to different worlds and have their game modes changed automatically. I was wondering if this plugin does that :D (which from what you just said, seems as though it does :P) Anyway, thanks for devoting time to making plugins! I will download it definitely :)
eriorkless
@eriorkless
Let me try to understand before I try to answer.
Do you mean logged in to the server? As in when a player joins a server? Because I can't see any other way to warp. ;) Perhaps you mean Autogamemode required you to re-log in? This is not necessary in DefaultGameMode.
The only other thing I can think of that you could mean, is being logged into the console. That is not required either.
You just use the config.yml to define either "creative" or "survival" for each world, and it just works. :) Let me know if it doesn't.
Hiya, so if you warp into another world will it automatically change you? I tried using "Autogamemode" but it would only change your mode if you "logged in" not if you warp from a creative world to a survival, and vice versa.
Thanks a bunch :)
eriorkless