MobToggle

MobToggle - simple Mob control:

Version: v1.2

By request:

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".


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    31534
  • Created
    Aug 28, 2011
  • Last Released File
    Mar 31, 2012
  • Total Downloads
    10,820
  • License

Categories

Members

Recent Files