MobAge
About the plugin:
MobAge |
v2.4
tl;dr, MobAge gets rid of inactive mobs and animals, via a nifty Bukkit method... With options!
.
A summary
Have you been wanting to limit the number of mobs on your server? Have you been doing just that, but found that they all spread out and never despawn? Or maybe you just need mobs to spawn close to each player, and not just every where possible?
Well I hate selling my plugin like that, but MobAge is your plugin! :D
.
So anyways, MobAge is a plugin that is designed to remove stray mobs that are impossibru find. The plugin adds 'age' to each animal and monster on the server. If a mob is not interacted with, it gets 'older' and older until it de-spawns. The plugin also will limit the number of mobs you want on the server, allowing you to use mobs in a different way for RPG and Adventure servers.
.
Features:
- Mobs only spawn within a configurable radius around one of any online players.
- MobAge checks for old mobs every 10 server ticks by default (configurable)
- ↑ Players, tamed mobs, and EnderDragons are exempt from this. They won't despawn.
- The age limit is defined in the config by server ticks
- A Mob's age can be reset if:
- A player makes any movement within their chunk
- The mob takes any damage
- The mob is targeted, or targets something
- The mob becomes tamed
- The mob interacts with something
As soon as their age is reset though, it starts adding up again.
.
How to use:
Commands:
- /mobage - view help
- Permissions:
- mobage.*
- mobage.reload
- mobage.config
Config:
If you're having trouble testing this, or it seems like it isn't working turn the Debug option on in the config!
TIME FORMAT IS IN TICKS. 20 ticks= 1 second
How the config for MobAge works: "Age check delay": This is how often the plugin should check for 'old' mobs to kill. Be cautious with this. Small changes... "Age limit": This is limit of age (in ticks) that a mob can have. Remember that their age is reset via a number of ways "Mob limit": How many mobs are allowed. 0 means no limit "Active radius": This is the radius (in blocks) around each player that is considered "inhabited".
Download:
- http://dl.dropbox.com/u/39588938/MogAge.jarCurrent Development build
- Download page
- Original Request
.
.
_
_._._._._._acuddlyheadcrab's plugins BBChatTags MobAge ChatWarn GMforAll MCHungerGames |
_
New version is out :) No new features yet, but it's cleaner and more efficient now.
@imilkywayz
Oh I didn't know that about CraftEntities. I actually should have used their eintity ID from the start, but i've been too busy to do an overhaul... until now :)
But yeah, I chose to leave it in ticks because it does allow for the more specific delay. I've done that simple conversion in other plugins, but I just left it alone for this one. However, I think I might do a switch to parsing a double value.
I mainly kept it in ticks to keep it consistent with the set/getTicksLived() method.
Yeah I'm pretty sure that you don't need to use "Craft(mob)" since that causes the plugin to break on every update. Also you use in ticks, i looked at your source and it definitely is evident your skilled enough in java to know you can easy use a int in config then multiply it by 20 so that uses seconds instead of ticks, that means it can't check less then 1 second unless you use a double but why would you want it to check that often is not apparent to me.
@acuddlyheadcrab
Any eta when u will fix this plugin? it's really really useful and you shouldn't let this become inactive.
@acuddlyheadcrab
Cool, thanks for the reply :) Look forward to the next release.
The plugin is a little buggy right now. Well a lot. I will try to fix things ASAP, but i'm also working on a different major plugin, so I'll mainly try to give updates on whats going on.
EDIT: If anyone's curious, I'm making the Minecraft Hunger Games plugin
@ezbik
Yeah I've noticed that too. The whitelist just doesn't really work. I'll try to fix it soon.
Oh also, that whitelist enabledfalse thing is a bug. I thought i removed it, but you can basically ignore it.
Still can't get the whitelisting to work. Opped on server, and in the config file its set to Whitelist: true. In the whitelist file, Enabled: true. Only thing changed, Zombies and wolves do not despawn. When I check the config in the console, it tells me, Whitelist enabled: false , no matter how I try to set it, either via the configuration file itself, or the console commands (tried reloading it after too, no effect).
Debug doesn't bring me back any information either, but when it starts, it seems to indicate whitelist is enabled, but it also has a second 'Whitelist enabledfalse' field?
Any help would be appreciated!
@acuddlyheadcrab
Can Ocelots still be tamed with your plugin? I am not entirely clear as to the whole consequences of your not being able to add cats. Thanks.
@acuddlyheadcrab
I had tried the whitelist function, but it only seemed to spawn creepers and endermen at night when enabled. The only thing I changed in the whitelist was setting Zombies to not despawn, as a test. What I meant by a per mob age limit is probably what the whitelist should do; (i.e. Zombies don't despawn ever, but chickens do), but didn't seem to work. Other than that, it works great though!
@ezbik
Uh. I don't quite understand the example, but I know what you mean by per-mob age limit.
I thought about adding that, but it seems a bit too extensive right? You can just turn off a mob's aging in the whitelist.
But anyways, maybe i'll add that. Maybe not, we'll see.
Trying this out now, could you add a per mob age limit option in the future? Maybe like:
Mobs: [Zombie, Skeleton, Creeper] # Define certain creature, or multiple.
(rest of config here)
or
Mobs: Passive # Passive for chickens, pigs, etc. Hostile for monsters
(rest of config here)
Updated to the latest file!
Thanks!
New version soon that'll support Ocelots and
Cats.EDIT: Cat's aren't added to bukkit yet. But I'll add them when the next Recommended build comes out (or whenever cats are added)
@acuddlyheadcrab
Your welcome for the help. Thanks for the fixes.
@wesgeek
Yeah, they were meant to exempt from aging, but a small mistake made it so they aren't.
_
Here's the fixed version: MobAge v2.2_1
Thanks for helping point out the bugs!
@acuddlyheadcrab
That's too bad. Would it still be possible to keep them from aging? My current goal with you plugin is to keep the passive mobs from despawning. Thanks again for the great plugin.
@wesgeek
Oh I forgot to mention it! Snowmen are not on the whitelist... There were limits with Bukkit could do, and Snowmen were unable to be blocked. I will look into this now that I just put it on my todo list, but for now, it's just Pigs and Monsters added... Sorry!
@acuddlyheadcrab
New issue. The default white list is out of date. I discovered this while trying to figure out how to keep snowmen from despawning. What is the key I need to add to the white list to configure them? Thanks.