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!
@coldandtired
thanks, i'm new to this kind of config, you've been a great help :D i'll report if that worked in the morning, it's 10:30 here...
although, i'm still getting this error. Im not sure if this is my configs, or if its the plugin. (This occurred when loading for the 1st time)
2013-10-20 22:31:38 [SEVERE] Could not pass event LivingEntityDamageEvent to Mobs v1.6.4 b1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at eu.sylian.extraevents.ExtraEvents.hit(ExtraEvents.java:470) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEvent(CraftEventFactory.java:93) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:381) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:437) at net.minecraft.server.v1_6_R2.EntityLiving.damageEntity(EntityLiving.java:636) at net.minecraft.server.v1_6_R2.EntityAnimal.damageEntity(SourceFile:128) at net.minecraft.server.v1_6_R2.EntityLiving.x(EntityLiving.java:148) at net.minecraft.server.v1_6_R2.EntityInsentient.x(EntityInsentient.java:111) at net.minecraft.server.v1_6_R2.Entity.l_(Entity.java:230) at net.minecraft.server.v1_6_R2.EntityLiving.l_(EntityLiving.java:1242) at net.minecraft.server.v1_6_R2.EntityInsentient.l_(EntityInsentient.java:150) at net.minecraft.server.v1_6_R2.World.entityJoinedWorld(World.java:1354) at net.minecraft.server.v1_6_R2.World.playerJoinedWorld(World.java:1335) at net.minecraft.server.v1_6_R2.World.tickEntities(World.java:1223) at net.minecraft.server.v1_6_R2.WorldServer.tickEntities(WorldServer.java:480) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:572) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NoSuchMethodError: eu.sylian.extraevents.LivingEntityDamageEvent.getDamage()I at eu.sylian.mobs.BukkitListener.damaged(BukkitListener.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 31 more
And i got this error after i killed one of the zombies:
2013-10-20 22:35:18 [SEVERE] Could not pass event LivingEntityDamageEvent to Mobs v1.6.4 b1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at eu.sylian.extraevents.ExtraEvents.hit(ExtraEvents.java:470) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEvent(CraftEventFactory.java:93) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:381) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:406) at net.minecraft.server.v1_6_R2.EntityLiving.damageEntity(EntityLiving.java:636) at net.minecraft.server.v1_6_R2.EntityMonster.damageEntity(EntityMonster.java:39) at net.minecraft.server.v1_6_R2.EntityZombie.damageEntity(EntityZombie.java:127) at net.minecraft.server.v1_6_R2.EntityHuman.attack(EntityHuman.java:884) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1113) at net.minecraft.server.v1_6_R2.Packet7UseEntity.handle(SourceFile:36) at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NoSuchMethodError: eu.sylian.extraevents.LivingEntityDamageEvent.getDamage()I at eu.sylian.mobs.BukkitListener.damaged(BukkitListener.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 30 more
thanks again
@shaythegoon It would have to look like this:
@coldandtired
is if i did this,
<event if_mob="zombie" action="remove" sub="default_drops"> <action="give" sub="custom_drops"> <entry if_mob_name="Lvl. 1 Zombie" item="265" amount="0 to 3"/> <entry if_mob_name="Lvl. 2 Zombie" item="265" amount="1 to 4"/> </action> </event>
it should work and not crash my server... (Crashed server again, LivingEntityDamageEvent)
@shaythegoon The entry elements have to be sub-elements of one of the attributes, like this:
<event if_mob="zombie" action="remove" sub="default_drops"> <entry if_mob_name="Lvl. 1 Zombie" action="give" sub="custom_drops" item="265" amount="0 to 3"/> <entry if_mob_name="Lvl. 2 Zombie" action="give" sub="custom_drops" item="265" amount="1 to 4"/> </event>
Why does that produce an error in the Console and nothing happens in the game if I put that into the spawn.txt file :C
I used an NBTEditor to change the name of the zombie, so it should work... Please get back soon!
(Sorry its not very neat, it won't let me tidy it)
@rvg11 Have you tried updating Extra Events to the latest version? (Or at least the latest version that matches whichever Bukkit you are running).
19:46:02 [SEVERE] Could not pass event LivingEntityDamageEvent to Mobs v1.6.4 b1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at eu.sylian.extraevents.ExtraEvents.hit(ExtraEvents.java:470) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEvent(CraftEventFactory.java:93) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFacto at net.minecraft.server.v1_6_R3.EntityLiving.damageEntity(EntityLiving.java:637) at net.minecraft.server.v1_6_R3.EntityMonster.damageEntity(EntityMonster.java:39) at net.minecraft.server.v1_6_R3.EntityEnderman.damageEntity(EntityEnderman.java:358) at net.minecraft.server.v1_6_R3.EntityEnderman.c(EntityEnderman.java:95) at net.minecraft.server.v1_6_R3.EntityLiving.l_(EntityLiving.java:1277) at net.minecraft.server.v1_6_R3.EntityInsentient.l_(EntityInsentient.java:150) at net.minecraft.server.v1_6_R3.EntityMonster.l_(EntityMonster.java:24) at net.minecraft.server.v1_6_R3.World.entityJoinedWorld(World.java:1354) at net.minecraft.server.v1_6_R3.World.playerJoinedWorld(World.java:1335) at net.minecraft.server.v1_6_R3.World.tickEntities(World.java:1223) at net.minecraft.server.v1_6_R3.WorldServer.tickEntities(WorldServer.java:480) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:574) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) Caused by: java.lang.NoSuchMethodError: eu.sylian.extraevents.LivingEntityDamageEvent.getDamage()I at eu.sylian.mobs.BukkitListener.damaged(BukkitListener.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 31 more 19:46:02 [SEVERE] Could not pass event LivingEntityDamageEvent to Mobs v1.6.4 b1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at eu.sylian.extraevents.ExtraEvents.hit(ExtraEvents.java:470) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEvent(CraftEventFactory.java:93) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFacto at net.minecraft.server.v1_6_R3.EntityLiving.damageEntity(EntityLiving.java:637) at net.minecraft.server.v1_6_R3.EntityMonster.damageEntity(EntityMonster.java:39) at net.minecraft.server.v1_6_R3.EntityEnderman.damageEntity(EntityEnderman.java:358) at net.minecraft.server.v1_6_R3.EntityEnderman.c(EntityEnderman.java:95) at net.minecraft.server.v1_6_R3.EntityLiving.l_(EntityLiving.java:1277) at net.minecraft.server.v1_6_R3.EntityInsentient.l_(EntityInsentient.java:150) at net.minecraft.server.v1_6_R3.EntityMonster.l_(EntityMonster.java:24) at net.minecraft.server.v1_6_R3.World.entityJoinedWorld(World.java:1354) at net.minecraft.server.v1_6_R3.World.playerJoinedWorld(World.java:1335) at net.minecraft.server.v1_6_R3.World.tickEntities(World.java:1223) at net.minecraft.server.v1_6_R3.WorldServer.tickEntities(WorldServer.java:480) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:574) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) Caused by: java.lang.NoSuchMethodError: eu.sylian.extraevents.LivingEntityDamageEvent.getDamage()I at eu.sylian.mobs.BukkitListener.damaged(BukkitListener.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 31 more
Here is my config: http://www.filedropper.com/mobs
@TheBowman42 I don't think you can yet but it's something I want to add.
Can one add lore to drops?
@oNcLe Should be pretty easy - I'll look into it tomorrow.
Hello, is it possible to add custom server commands to drop events? I checked the tutorials page, but i could not find anything.
For example some plugins are creating new items that dont have new id's like "realisitic backpack" or "SimpleAttributes". SimpleAttributes example: "/attributes give <Player> <ItemID> <Amount> <attribute:value>" The users dont have access to that command.
Kind Regards, oNcLe
@coldandtired
I knew that. ^_^ You're my favorite. Don't tell the others. <3
@TheBowman42 You can't use both conditions and ratio in the same element. If you do ratio will be ignored which is why your first element always gets chosen. You can replace ratio with if_percent if you need but the simplest would be to remove the world condition (as each element is the same world anyway).
Howdy,
So, ordinarily I can figure out why my config is not working. This time, however, it's got me stumped. I am trying to achieve a set of custom drops. Below is a copy of my dies config. It worked in a previous version but now it doesn't. After 20 trials of 300 mobs, it still only drops the items in the first ratio. I've switched the ratios from the first and last sets but to no avail. Am I doing it wrong or just EXTREMELY unlucky?
<event>
<action>
<entry if_world="world"
ratio="70"
action="give"
sub="custom_drops"
item="287, 375, 352, 280"/>
<entry if_world="world"
ratio="20"
action="give"
sub="custom_drops"
item="289, 262, 05, 04, 268, 269, 270, 271, 50"/>
<entry if_world="world"
ratio="9"
action="give"
sub="custom_drops"
item="391, 392, 265, 266, 06, 39, 40, 263, 110, 16, 272, 273, 274, 275"/>
<entry if_world="world"
ratio="1"
action="give"
sub="custom_drops"
item="267, 268, 269, 270"/>
</action>
</event>
@Saboran The GUI was for an old version of the config so won't work.
As far as I know you can't use custom ids with the plugin (although I seem to remember adding support for SpoutPlugin ones).
/reload_mobs should send a message to the player who used it or the log if it was a console command. Check the log to see if there are any errors.
Hi there,
I'm not sure what I'm doing wrong but I just can't seem to make heads or tails of the config files. I see in some of your screenshots that there's a sort of gui but I don't see any links to it - is it still available and working?
If not, I'm trying to make a mob spawn a custom item upon death. This item is not normally included in the vanilla items, it's from a mod (IC2 to be exact). Could the issue be that this item won't spawn because it's not in the vanilla item list?
Here is what I'm trying to use as my code:
Additionally, I found this snippet of code in the comments:
And tried it, but even then I couldn't get it to work. Any help would be incredibly appreciated, thanks.
EDIT: Is the /reload_mobs command at all verbose? When I use it I'm not getting any notification of it actually doing anything
@RivfaderAldhissla With Spawns you can set the weapon's drop chance to 100%, so they will always drop it. I'm not sure whether I added that to mobs spawns by other means though,
As for the nametag, as far as I know it doesn't affect despawning at all. Hostile mobs despawn by default and animals don't. You can set it explicitly with Mobs to be sure though.
@coldandtired: Thank you!
And it would seem that I am hell-bent on an asking-spree today. I also happen to wonder how you define which mobs that spawned wearing items, or handle the syntax for the following scenario: I wish to make it so all mobs that have items equipped/have picked up items to always drop whatever they are carrying upon death. I can't seem to figure out how to go about solving this problem either, so your help would be appreciated.
One further question I have is whether naming a mob via your plugins, so that mob spawns with a nametag, actually holds the same anti-dispawn potentials that ordinary manually applicated nametags do?
@RivfaderAldhissla Hmmm. I thought I added it but now I can't see where it is. I'll look into it.
Greetings! I want to nerf the enderdargon so it can then be added to a more regular spawning-cycle using you other plugin, "spawns", but to do that I need to remove its ability to spawn portals upon death ( which I presume can be done with the "creates_portal" and "cancel_event"), and stop its ability to break blocks. The problem is that I do not know how I would go about stopping the enderdragon from breaking blocks.