Anyone who has been active on the main forums in the last few days must surely have already heard the news.
I'm not going to comment on why and how, but the short version is that Bukkit is almost certainly not getting passed this.
Consequently, the future of BukkitDev is very uncertain. Even if the legal matters were resolved tomorrow there isn't really anybody left to deal with file submissions anyway. There's no indication about how long the site will stay up and what will happen to the files.
Anyway, while I will continue updating and developing my plugins you will need to look for updates somewhere else, namely the wiki. I will be updating this wiki in the next few days to facilitate better communication (forums, email, etc.) and adding any documentation that's missing.
I will also, of course, be looking into porting the plugins over to whichever API emerges from the ashes!
Introduction
Mobs gives you the ability to control almost every aspect of the mobs on your server, and a few other things on top.
The concept is simple - as your server is running, things are constantly happening. Players are mining, mobs are spawning, the sun is going down, it's starting to rain, etc.
Behind the scenes, CraftBukkit is sending messages to all interested plugins about these events. Player John broke a block of stone in world at location 55, 23, 137; A sheep died in world at location 209, 77, 22, etc. There are dozens of events, and thousands of these messages are sent every minute.
Most plugins listen for a few of these messages and act upon them. Mob-blocking plugins, for example, listen for new mobs spawning somwehere, and then look at the config to decide whether to allow or block the mob from spawning. Chat filtering plugins listen for the player is chatting messages and block/edit them according to the config.
Mobs listens for most (eventually all) of the mob-related messages, and a few extra ones, and gives you the option to block, allow, or alter the effect of the event.
However, it goes beyond that in that it allows you to use the event to perform one or more actions. So, while you may not want to interfere with creepers spawning, you can use this event to change the weather, set the time, drop an item somewhere, give someone some experience points, or as many of the dozens of possible actions that you want.
Additionally, it's possible to use conditions to filter the events you act upon. Want to give creepers a 1 in 1000 chance of taking out half your house when it explodes? Not a problem (except for the house).
Config.yml
checkfornewerversion - set to yes to allow the plugin to contact this site and see if there is a newer version available. Note that it onlys checks, and doesn't download anything.
generatetemplates - set to yes to have the plugin create empty config files for every possible event. Alternatively, simply look up the names on the
tutorial and create only the files you want.
worldstoignore - a list of worlds in which the plugin will be effectively disabled, ignoring all events in those worlds.
allow_debug - set to yes to enable other plugins to access the event API (for logging, debugging, etc.)
Commands
There is one only command in the plugin, which is
/reload_mobs, or
/rm. The reloads the config without reloading the plugin itself.
Users need the mobs.can
reloadconfig permission, or to be an op.
Update checking
If you like, you can set the plugin to check for any newer versions that get released. To do this use the check
fornewer_version option in the config file. This only works for release builds so you won't be bothered by any beta or dev builds.
Note that no update will be downloaded even with this set.
Tutorial
Start the tutorial
here to read up on how the plugin works
The tutorial for the old config can be downloaded from
here for offline viewing.
Updates
Updates for all my plugins will be announced via Twitter, which you can find
here.
Dependencies
Mobs has another plugin as a dependency called Extra Events. Read more about it
here.
Make sure you install Extra Events as well otherwise you will get errors on startup!
Donate
Mobs takes a lot of time to maintain, so if your server is enriched by it and you have some spare donations please consider sharing!
If you're penniless or like
Mobs but not that much I'm also partial to TF2 items. Send any you don't want my way! STEAM id: coldntired
If you don't know what TF2 is, then start playing! It's
free and fun!
@6Twisted
Does your config set 'hp_max' ?
It should set 'max_hp' instead.
You may also use full_hp to set both current and max hp at the same time. This would be suggested for spawning new mobs, if you're only setting max hp it will spawn with the normal HP level, with room to heal up to the Max hp (I think).
Edit: Has full_hp been added to the Mobs site yet? Now that I look I don't see it there.
Any idea what's causing this error? Obviously something to do with me setting mob hp but it was working fine before so I've probably just typeod something. The console get spammed with it every 5-10 seconds so it's causing slow chunk loading.
[SEVERE] Could not pass event CreatureSpawnEvent to Mobs v1.5.2 b8 Caused by: java.lang.IllegalArgumentException: No enum constant eu.sylian.mobs.Enums.SubactionType.HP_MAX at java.lang.Enum.valueOf(Enum.java:236) ... 12 more
@coldandtired
Sorry, by named items I meant actual names, not the item name. I was planning to have sets dropped by rares to collect.
Also, can I suggest for the next update being able to add buffs (with time value) to mobs? If it's not possible already that is and I'm just missing it =P
@coldandtired
Fixed that for you.
And thanks for that. I didn't realize you could divide <entry> further with <sub> (Or rather, pretty much anything with many different <tags> like <item> and stuff). Could you continue nesting that as far as you wanted?
Also, in the Config.yml section about there is a link on the word 'tutorial' that still leads to the old binhoster site.
@6Twisted By named items, do you mean diamond_sword, wool, etc.? If so, it should be.
The config branches based on conditions or ratio
You can either do something like this
or branch again
@coldandtired
How would I use a ratio in for example my spawns.txt where I have entries for all the mob types, but I want to target zombie, skeletons ect separately? And is it possible to add named items to loot?
I'm having a ton of fun with this plugin turning my server into WoW xP
@6Twisted It's possible that Minecraft doesn't allow spaces in the name. Mobs just passes the value to Bukkit.
For the other thing you can do something like this:
The top entry has a 99.9% chance of happening.
@coldandtired
Sorry, two more questions, does your percent and input support floats? It would be useful to have a chance < 1%. And does the mob name support spaces? I've tried the space character but it gets taken out, and _ just stays as _
I appreciate you answering my questions that you've probably answered a 100 times before xP
If anyone wants to see the scripts in action, survivalcraft.24-7.ro (Not to advertise or anything). Feel free you ask if you'd like code snippets. So far I have mob levels, rares and some other stuff.
@6Twisted Yes. You can adjust the xp dropped in the dies event, and you can also spawn xp orbs at any event if you want to reward something.
@BlueDwarf
Thanks for the help Blue and cold, it's all working now ^^
One final question for cold, is there a way to fix exp dropping on mobs with a custom exp amount, even when they die from falling ect?
EDIT: Scratch that, one more question, how would I add a 1% chance item to custom_loot while performing another action on a mob? I have a 1% chance action to add a spawn egg to creepers custom_loot, but if I instead make them charged, the spawn egg action never gets called.
EDIT: Ok, ok, ok, ONE more question. Is it possible to remove a mobs name in spawns.txt? I've tried both of the below but it doesn't work: <linked_action name="clearname" action="remove" sub="name"/> <linked_action name="clearname" action="set" sub="name" value=""/>
@6Twisted Setting them in the same place is very risky (at least using Bukkit and not CraftBukkit). After the mob is created by a plugin, control switches to the spawns event, and every plugin on the server can modify that mob (or cancel the event) before the original plugin gets control back.
In Mobs' case it also means any settings/conditions for new mobs will be executed/checked twice which is why it's done the way it is.
@6Twisted
Alter your linked action a bit to add an identifier:
<linked_action name="spawnbroodlings" action="spawn" sub="mob" mob="zombie" mob_name="Broodling" amount="3,4,5"/>
Then in spawns.txt, you just need to add the name condition to your zombies:
<entry if_mob="zombie" if_name="Broodling" action="set" sub="adult" value="false"/>
@coldandtired
Thanks, I thought I would have to structure it that way but I saw someone elses giant spawn code on here where he had the spawning and variable setting in the same event and it seems to work. How would I set the spawned zombies title in the same event so I can differentiate it from natural zombies?
My current spawn code in dies.txt:
<linked_action name="spawnbroodlings" action="spawn" sub="mob" mob="zombie" amount="3,4,5"/>
<entry if_mob="zombie" if_percent="below 10" if_adult="yes" if_killed_by_player="yes" action="notify + spawnbroodlings"/>
@coldandtired
Fair enough! Feel free to chat me up if you need a second opinion, I'm a philosophy major so logic is my wheelhouse. :)
@SXRWahrheit The code is not too difficult but gathering all the rules which Minecraft follows when spawning and determining which rules to allow users to change and by how much needs a little thinking :)
@coldandtired
I used to use a plugin called Monster Apocalypse that worked... to some extent. It was very crude and it caused lots of problems but it did manage to achieve altering the default spawns somehow.
I'm sure the #bukkitdev guys would be happy to help as well. ;)
@SXRWahrheit I'm looking into it now. I think I see a way but it's not easy :(
@coldandtired
Awesome update! Think you'll start on the spawning management thing soon?
Big update with all (I think) of the recent requests. Note that you'll need to update Extra Events (http://dev.bukkit.org/bukkit-plugins/extra-events/files/14-1-5-2-b2/) as well.
Entity equipment is now there, allowing armour and weapons to be set. Note that it's possible to set non-armour/weapons as well, so if pumpkin-headed zombies are your thing you can live it up!
Players can also have their hotbar item selected, and any slot in their backpack filled.
Conditions for the above are also added, but note that when you add armour to a mob that can't wear it (like a pig) Minecraft still assigns it so checking for the armour in a condition can still work. Not sure if useful or a problem yet,
There's a new event called player_command, which is called whenever the player types a command, but before any checks about permissions, valid command, etc. You can add your own checks with the player permission condition, new if_command/if_not_command and new if_command_args conditions. The last one is simply the number of arguments (not including the command itself).
It's now easier to target all mobs, or all mobs of a certain type using every. Every on its own would be every living entity, whereas every_pig would highlight pigs, etc.
In other news my main page is now up at sylian.eu. I think you can tell I'm better with the coding than the designing but I like it. I'm also about to move all the bug tickets to bugs.sylian.eu.
@6Twisted When you spawn a mob using the action that mob gets its own separate spawns event, and no code / config from the current event will affect the new mob.
What you need to do is spawn the mob (in the dies event here) and then set it up in the spawns event. You can specify a name for the new mob in the dies event if you want to be able to refer to that mob specifically.