MobToggle
MobToggle - simple Mob control:
Version: v1.2
MobToggle is a simple plugin that allows you to turn monsters and animals on and off using simple commands. It is permissions compatible, and allows you to control both monsters and animals separately. It supports multiworld, and will only modify the world you are standing in when you use it.
When you turn Monsters off, it automatically kills all monsters on the map, and reports how many of them were killed.
However, it will NOT prevent mobs from spawning by unnatural means, such as other plugins. I have done some testing and it seems to be working fine, but please do report any problems and I will try to fix them quickly.
The commands are:
- /montoggle - turns monsters on/off
- /anitoggle - turns animals on/off
- /mobtoggle - turns monsters AND animals on/off.
A note about /mobtoggle: it switches both of these independently of the state the other is in. This means that, for example, if monsters are off and animals are on, using /mobtoggle will turn monsters on and animals off!
the permissions are as follows:
- MobToggle.MonToggle - allows /montoggle
- MobToggle.AniToggle - allows /anitoggle
- MobToggle.MobToggle - allows /mobtoggle
- MobToggle.* - allows all of the above.
Each of these are given to OPs by default.
Features:
Allows you to turn monsters on/off Allows you to turn animals on/off Still allows other mob spawning plugins to function When Monsters are off, health regenerates. Persistence (settings optionally carry through reboot, see below)
About Persistence ATTENTION: TURNS OUT I BROKE THIS! HOPE TO HAVE IT BACK SOON!
Persistence is now available for MobToggle. What that means is that when you stop the server it will save the state of each world, and attempt to restore those settings when you next boot up. It will always save the settings, but will not load them unless you change persistence: false in config.yml to persistence: true. This file will only exist after you run the server at least once. The setting is off by default because it conflicts with other plugins that attempt to manage the same settings, such as multiverse. Mobtoggle still operates fine with these plugins (to my knowledge) when persistence is kept off.
You can also change the saved spawn settings in the file manually, if you want. Settings are stored as [worldname]: [setting]. Simply alter the entry for the world in question to use the new setting. Valid options are:
- monsters
- animals
- both
- neither
The file should not be case-sensitive and technically only reads the first character, so it should be fairly difficult to break. In the event that it does read an invalid setting, however, it will simply default to "both".
Heh... not a problem. I'll see if there is anything else out there that does persistent monster blocking. Yeah, we need all other worlds(there are 7 worlds total on the server) to be full on survival because that's what most of us want. We just wanted a CareBear world for the young kids so they could build, but still have to deal with everything else that goes along with survival mode (hunger, falling damage, etc...)
@lmazon
Well, this is awkward. It seems that when I updated the plugin, I updated it from a version before persistence even existed. Not sure how I managed that. Anyway, I can take a look into it but I really can't guarantee anything will happen in short order depending on how bad the damage is. Also, bukkit still doesn't even have a beta build up for 1.2.4 yet, so that may cause its own issues as well. Is there any particular reason you don't just set the server to peaceful?
EDIT: ok, so it turns out I have a few snags with fixing this:
Yeah... turns out I don't know what I'm doing as well as I thought I did. It will probably be a while. If you need a fast resolution, its probably best you look for an alternative strategy. Sorry about that.
I've got MobToggle running on 1.2.4. It appears to be working, but I cannot find the config.yml file. I have started and stopped the server. I do not see a MobToggle folder in the plugins directory or in the main plugins folder. I have verified that the program is, indeed, running, as the /mobtoggle command works. Any ideas? I need persistence to work because one of the worlds on the server is meant for kids 4+ who frequent the server, and while we want them to be able to experience survival mode, we want it without the monsters. Thank you in advance.
@mctribble
Thank you for your help. Hopefully bukkit changes so this can happen.
MobToggle has been updated to V1.2, with support for the current beta build. Let me know if you have any problems. Also, it was reported to me that the plugin no longer allows mob spawners to create monsters. As far as I can tell this is a result of a change in bukkit itself, and I cannot change this to old behavior without a complete rewrite. As such, this plugin now disables/enables them as well. I am sorry if that causes anyone problems.
@rsmcwow
Alright, I will have to sit down and see if I can track it down, but no promises. Hopefully it's something simple. I'll look into the spawner thing a bit too, but I suspect the OP may now be incorrect. I'll post again once I've looked into it.
@mctribble
It has given me that error along with a few bukkit errors. Most plugins that aren't '1.2.3' don't work correctly and give errors.
I read on your post that: However, it will NOT prevent mobs from spawning by unnatural means, such as mob spawners or other plugins.
- But it doesn't stop mobs from spawning from spawners.@rsmcwow
I think that might actually be intended behavior. It essentially just temporarily changes the settings for whether or not the server should spawn animals or monsters. Because using the spawn eggs isn't so much the server spawning them as it is you spawning them, they would be unaffected. I'm not sure offhand how one would block spawn eggs, but I don't think that's something I want this particular plugin doing anyway.
As for updating, it should be working fine as it is. I doubt I will be changing anything with it unless I hear it stopped working, because as things stand it will be a little bit of a hassle setting things up again so I can work on them.
Someone else did report that it produced an error message on startup, though. Has it been doing that for you?
I found out it "works". I can spawn mobs with eggs but not spawners.
Are there any plans for this to be updated?
@colin8696909
Unfortunately I don't think bukkit supports it that easily... I think its basically just an on/off thing. I'll look into it a little this weekend though if I remember.
I hope it's not to much trouble but do you think you could add the ability to leave on mob spanners (i am referring to the cage blocks with the spinning pig). I don't want the adventure to find random mobs but if i could kept the mob spawners on I wouldn't have to set up a dozin spawning blocks.
@mctribble
Thank you for looking into it anyways :)
@Master_Raven_Shadow
This would be beyond the scope of this plugin, and unfortunately after browsing around the javadocs a bit, i'm not sure if the bukkit API can actually currently support this. Unfortunately, I think that if the server decides it won't happen, there might not be much we can do about it. I would advise going to the request forum and asking for help there. Those guys would know more about it than I do.
will you be adding the ability to override the biome settings? I.E. currently passive mobs dont spawn on islands in Oceans Biomes or Deserts (which i'd like to find something that overrides this)
Updated to V1.1, which includes persistence. Persistence is incompatible with several other plugins, including multiverse, and is therefore disabled by default. See main post for more.
Tested with latest RB and found no problems. Report here if you find anything (I should notice comments now, honest!)
Dang, sorry it took so long to notice this. apparently this doesn't email me when people post. Will have to figure out how to change that. If you want the change to persist, why not just set the change in server.properties? I can look into persistence if you want, but it seems that might be better handled through server.properties or whatever world management plugin you might be using.
EDIT: What the heck. I'll try to include this and just make it optional, provided I can fix these weird problems I'm getting trying to make it work.
btw. the setting resets on startups/restarts. Can you make them persist?
amazing. this works with CB 1124. I can disable mobs and animals and thus exp orbs. Temporary fix. If a player with many exp orbs dies it will potentially lag out the server.