MobTimer
MobTimer gives mobs (or any spawnable entity... I think) a configurable lifespan. When their life expires, they will either die or vanish, depending on the configuration. Lifespans can be configured per-entity and per-source (That is, you can have zombies only live for 5 minutes, but zombies created by spawners only live for 30 seconds).
Feature overview:
- Per-source and per-entity configurable lifespan.
- Can be configured to reset lifespans on interaction.
- Can be configured to allow or prevent item drops from mobs removed by this module.
This is a simple mod I made for the server I play on to deal with the thousands of mobs created by the various EXP farms setup across the world. It works great for us, but it may not work so well for everyone or every server. Your mileage may vary, etc., etc.
Feel free to use or modify this mod as you see fit. All I ask is for proper credit for any derivative projects (or maybe a nice donation :D - click the "donate" button on the upper right).
-C
update for 1.8.1 would be nice. Especially the Lifetime for spawnermobs is a great feature!
@Zefram:
Unfortunately, I'm not able to reproduce your lag issues. I just tried running my server with the configuration you gave (both as written and as intended), and saw no difference between running with and without MobTimer (running 1.2.5-R4 with ~5000 mobs).
As we're likely using very different server setups, I can only assume that you have another plugin which doesn't play nice with MT. That being the case, and since your server seemed to run fine without MT, I recommend continuing without it. Sorry mate.
If you happen to tinker with it and figure out which combination of plugins/settings/etc. is causing issues, let me know and I'll look into it further.
ANY.spider.lifespan 12000
ANY.skeleton.lifespan 12000
ANY.zombie.lifespan 12000
ANY.creeper.lifespan 12000
ANY.CAVE_SPIDER.lifespan 12000
my mob amount 3000
@Zefram:
You're still not giving me anything to go on. My best guess is one of (a) the number of mobs being managed by MobTimer is so high the scheduler can't keep up (which would be impressive -- that should be a very large number) or (b) that the lifespans are set so low that mobs are constantly dying and respawning. The latter is taxing enough, but if you also allow mobs to drop items upon removal, you could end up with thousands of item entities in short order -- and that's enough to bring about any server to its knees.
Your best bet is to check your configuration and make sure your lifespan values are reasonable (our server uses five minutes for most everything). If that's not an issue, use a diagnostic tool to determine the number of active entities your server has. You may need to shut off drops for mobs removed by this plugin.
If the configuration is okay and your entity count is reasonable, then this may be a case where this plugin simply won't work for your environment.
1.0.3
Again very lag...
@Ceiu
You were right, updated to java7 and it's working now, ty
omg, you saved my server from selfish players and their mob farms. do you have a donate button? i want to give you money!
@wafffllesss:
The only issue I can think of that would prevent it from loading is a class version mismatch. Make sure you're running Java 1.7.0_03 (Java 7) or newer. You can check your Java version by starting a command prompt and entering the command "java -version".
If that's not an option, you can download the source and recompile it yourself using whichever version you prefer. Simply follow the plugin tutorial and you'll be good to go.
@Zefram:
That's unfortunate. However, that's not very much for me to go on. How many mobs are active when the ticks drop down? Also, how many mobs are being managed by the module?
UPDATE: I've made a couple optimizations where it made sense to (v1.0.3 is awaiting approval). It may help with your issue, but, to be honest, I'm not expecting much of a performance boost.
01:00 PM [SEVERE] Could not load 'plugins\mob_timer.jar' in folder 'plugins'
use mobtimer my tps down to 3
remove mobtimer tps up to 20
I do not know why