[MECH] bMobs v1.1 - Complete creature control [766]

Discussion in 'Inactive/Unsupported Plugins' started by Brad811, Feb 12, 2011.

  1. Offline

    Brad811

    bMobs (v1.1)
    Download: bMobs.zip
    If you like the work I've done, or would like to see more features and improvements, please consider donating!

    NOTE: This plugin does not cause more mobs to spawn than the default spawn rate.

    Features:
    • configure creature health, probability of spawning, whether they can attack, and whether they burn in sunlight
    • destroy any unwanted mobs every few seconds
    • destroy any unwanted mobs upon targeting the player
    • destroy any unwanted mobs upon spawning
    • kill all of any mob type on command
    • see how many mobs are killed when this command is called
    • configurable via "bMobs.yml" file
    • supports: creeper, skeleton, spider, zombie, ghast, giant, pigzombie, slime, chicken, cow, sheep, pig, squid, wolf
    • multiple world support
    • change properties without restarting server
    Well I enjoyed making bFlight so much, I decided to make another plugin.


    This is another plugin I've wanted for myself for a while and haven't seen a simple solution for.

    Try it out!

    Usage:
    Run the server with the plugin installed. Edit the included bMobs.yml as you see fit.

    Commands:
    • /bkill animals - kills all anmials in your current world
    • /bkill monsters - kills all monsters in your current world
    • /bkill all - kills all anmials and monsters in your current world
    • /bkill [animal or monster type] - kills all living entities of this type
    • /bmobsreload - will reload your properties file and apply any changes, and add any worlds not listed in it (you will need to run this after starting your server if you have multiple worlds)
    Permissions: (not required if Permissions is not installed)

    • bmobs.bkill
    • bmobs.reload
    Example bMobs.yml file:

    Code:
    ##
    # Example bMobs.yml
    ##
    worlds:
        world:
            skeleton:
                enabled: true
                aggressive: true
                health: 2
            zombie:
                enabled: true
                probability: 0.5
                aggressive: false
                burn: false
                health: 10
            spider:
                enabled: true
                probability: 0.2
                burn: true
                health: 10
            creeper:
                enabled: false
            sheep:
                enabled: false
    
    ##
    #   [mob type]:
    #       enabled: [true/false]
    #       probability: [0.0-1.0]
    #       aggressive: [true/false]
    #      burn: [true/false]
    #       health: [0-200]
    ##
    May add more functionality in the future if there is interest!


    Version History:
    1.1
    • Added burn control
    • Added kill count when using /bkill command
    1.0

    • You can now control which mobs can attack, their probability of successfully spawning, and edit their health!
    • Now uses yml file
    0.6

    • Added ability to kill one mob type. Example: /bkill cow
    0.5

    • Added multi-world support!
    • Added ability to change and apply settings without restarting the server
    0.4

    • Added /bkill command
    • Animals can now be controlled as well
    0.3

    • Added spawn listener (may not work on older builds!)
    0.2

    • Now kills all mobs not on the allowed list in all worlds every few seconds, as well as any mobs that target a player that are not on the allowed list.
    • List of monsters now includes: creeper, skeleton, spider, zombie, ghast, giant, pigzombie, slime
     
  2. Offline

    Scyfi

    How is this on performance? Does it have a big impact?
     
  3. Offline

    Pencil

    Wouldn't it be alot better to instead of killing mobs on spawn to just prevent them from spawning?
     
  4. Offline

    Brad811

    Right now all you can really do is cancel spawn events (which this plugin does). If you don't want Minecraft to even try to spawn creatures in the first place you have to turn spawn-monsters off, which means none of them will spawn.
     
  5. Offline

    Robert Brinton

    I'm seeing an error as my server starts -- the server and the plugin seem to still run as expected, I just hate SEVERE errors and NullPointers.

    Code:
    2011-03-08 00:53:17 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-493-g8b5496e-b493jnks (MC: 1.3)
    2011-03-08 00:53:19 [INFO] bMobs got world: ISummer
    2011-03-08 00:53:19 [INFO] Problem getting worlds from server! Try running "/bmobsreload" once server is finished starting up.
    2011-03-08 00:53:19 [INFO] bMobs version 0.5.5 is enabled!
    2011-03-08 00:53:19 [INFO] [MultiVerse] Permissions Found
    2011-03-08 00:53:19 [INFO] [MultiVerse] - Version 1.5 (Permissions 2.1+) Enabled
    2011-03-08 00:53:19 [INFO] [MultiVerse] Loading World & Settings - 'ISummer' - NORMAL
    2011-03-08 00:53:19 [INFO] [MultiVerse] Loading World & Settings - 'nether' - NETHER
    2011-03-08 00:53:19 [INFO] bMobs processing world: ISummer
    2011-03-08 00:53:19 [INFO] bMobs processing world: nether
    2011-03-08 00:53:19 [SEVERE] Could not pass event WORLD_LOADED to bMobs
    java.lang.NullPointerException
        at com.bradsproject.BradleyJewell.bMobs.bMobs.reload(bMobs.java:196)
        at com.bradsproject.BradleyJewell.bMobs.bMobsWorldListener.onWorldLoaded(bMobsWorldListener.java:23)
        at org.bukkit.plugin.java.JavaPluginLoader$37.execute(JavaPluginLoader.java:312)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
        at org.bukkit.craftbukkit.CraftServer.addWorld(CraftServer.java:280)
        at org.bukkit.craftbukkit.CraftWorld.<init>(CraftWorld.java:44)
        at net.minecraft.server.WorldServer.<init>(WorldServer.java:29)
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:231)
        at com.onarandombox.Rigby.MultiVerse.MultiVerse.loadWorlds(MultiVerse.java:437)
        at com.onarandombox.Rigby.MultiVerse.MultiVerse.onEnable(MultiVerse.java:176)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-08 00:53:20 [INFO] bMobs processing world: ISummer
    2011-03-08 00:53:20 [INFO] bMobs processing world: nether
    2011-03-08 00:53:20 [SEVERE] Could not pass event WORLD_LOADED to bMobs
    java.lang.NullPointerException {snipped}
    2011-03-08 00:53:20 [INFO] [MultiVerse] Loading World & Settings - 'BigIsland' - NORMAL
    2011-03-08 00:53:20 [INFO] bMobs processing world: ISummer
    2011-03-08 00:53:20 [INFO] bMobs processing world: nether
    2011-03-08 00:53:20 [INFO] bMobs processing world: BigIsland
    2011-03-08 00:53:20 [SEVERE] Could not pass event WORLD_LOADED to bMobs
    java.lang.NullPointerException { snipped }
    
    I don't think I got this the first time I loaded bMobs (but it might have been a reload and not a full start).

    It looks like MultiVerse is trying to send a WORLD_LOADED event and bMobs can't handle it (or at least can't handle this version of it). MultiVerse doesn't log its version, but it reports 1.5 in the plugin.yml inside the MultiVerse.jar I'm using.

    I just noticed the request for /bmobsreload in the log -- so I started the server, logged in and ran the command.
    I then shutdown the server and then re-started it. The error still occurs.

    Here's a fragment from my bMobs.properties file, it appears to be complete:
    Code:
    # List of creatures that will not be removed (start line with # to disable)
    world:ISummer
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:nether
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    Any ideas or assistance would be appreciated.
     
  6. Offline

    Brad811

    Ah yes, I think multiverse just isn't quite finished with the loading world yet, so bMobs tries to get it but can't, so waits and tries again. I can catch the error and just print out a line to make it less ugly.
     
  7. Offline

    Robert Brinton

    Seems like a reasonable way to handle it. Let me know when you have a version and I can test it.

    The log seems to indicate that bMobs reprocesses the entire world list (as it knows it) every time it hears about a new world. The "[INFO] bMobs processing world: ISummer" line (for my default world) is repeated along with all of the known-this-run worlds as each additional world loads. Is this the intended behavior? Does re-processing worlds cause any issues?
     
  8. Offline

    MationMac

    Is there really any need for a .zip file if it just has the .jar in it?
    Maybe you could add the folder it creates when first launched?
     
  9. Offline

    Qiasfah

    Needs an update for 505.
     
  10. Offline

    Rufus

    Permissions don't seem to be working at this moment in time.
     
  11. Offline

    Brad811

    There ya go, updated for 522.
     
  12. Offline

    CoteRL

    With this latest version it duplicates my last world like 6 times in the config but sets all the duplicates to your default settings.

    http://pastebin.com/UZDnnkhq
     
  13. Offline

    Josh Harwood

    Currently my console is spammed up with this severe error:
    Code:
    08:57:41 [SEVERE] Could not pass event CREATURE_SPAWN to bMobs
    java.lang.NoSuchMethodError: org.bukkit.event.entity.CreatureSpawnEvent.getMobType()Lorg/bukkit/entity/MobType;
            at com.bradsproject.BradleyJewell.bMobs.bMobsEntityListener.onCreatureSpawn(bMobsEntityListener.java:36)
            at org.bukkit.plugin.java.JavaPluginLoader$44.execute(JavaPluginLoader.java:386)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at net.minecraft.server.World.a(World.java:750)
            at net.minecraft.server.SpawnerCreature.a(SourceFile:134)
            at net.minecraft.server.World.g(World.java:1412)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:348)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    any way of sorting it? i'm on CB 522, if there isn't a way, just making it one line error would help :)
     
  14. Offline

    stkeroro

    same here with 493 maybe it's incompatibility with cookiemonster?
     
  15. Offline

    Punchin

    Same. CB 522
    Other plugins are:
    AppleTreePlugin
    Elevators
    FenceDoor
    MyHome
    Otherblocks
    Pickboat

    Happened as soon as I logged in. Server was clear on startup until I logged in.

    *edit*
    Copy+pasted Robert Brinton's ISummer server settings over mine and adjusted it for my mob preferences and restarted my server. No errors..
     
  16. Offline

    Brad811

    ...are y'all running 0.5.6? Have you reloaded your plugins or restarted your servers? That code shouldn't even be in there anymore!
     
  17. Offline

    CoteRL

    @Brad811 Do you have any insight as to why on v0.5.6 whenever I reboot the server I get one of my worlds loaded at least 8 times and that world added to the config for each time?
    Config before boot
    Code:
    # List of creatures that will not be removed (start line with # to disable)
    world:world
    creeper
    skeleton
    spider
    zombie
    #ghast
    giant
    #pigzombie
    slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:nether
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    pigzombie
    #slime
    #chicken
    #cow
    #sheep
    #pig
    #squid
    
    world:oldworld
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    #pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:games
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    #pigzombie
    #slime
    #chicken
    #cow
    #sheep
    #pig
    #squid
    Boot-up messages
    Code:
    04:45:39 [INFO] bMobs processing world: nether
    04:45:39 [INFO] bMobs processing world: oldworld
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: world
    04:45:39 [INFO] bMobs processing world: nether
    04:45:39 [INFO] bMobs processing world: oldworld
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    04:45:39 [INFO] bMobs processing world: games
    Config after boot-up (not modified by me, but by the plugin)
    Code:
    # List of creatures that will not be removed (start line with # to disable)
    world:world
    creeper
    skeleton
    spider
    zombie
    #ghast
    giant
    #pigzombie
    slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:nether
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    pigzombie
    #slime
    #chicken
    #cow
    #sheep
    #pig
    #squid
    
    world:oldworld
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    #pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:games
    #creeper
    #skeleton
    #spider
    #zombie
    #ghast
    #giant
    #pigzombie
    #slime
    #chicken
    #cow
    #sheep
    #pig
    #squidworld:games
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:games
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:games
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    world:games
    #creeper
    skeleton
    #spider
    zombie
    #ghast
    #giant
    pigzombie
    #slime
    chicken
    cow
    sheep
    pig
    squid
    
    [MERGETIME="1299710486"][/MERGETIME]
    CB: 522
    bMobs: 0.5.6
    ServerPort: 273 (This is the portal/worlds plugin I use)
     
  18. Offline

    Josh Harwood

    yes i am and the only plugin i have in common is elevators
     
  19. Offline

    CoteRL

    Ok, I took a look at my serverport config and noticed that the order it loaded worlds was different than the order they were listed in bMobs.properties. I moved the worlds around in the bMobs config file and now I still get a lot of spam in the console, but it doesnt duplicate entries in the config anymore.

    Console spam on bootup:
    Code:
    17:46:18 [INFO] [ServerPort] loading: games
    17:46:18 [INFO] bMobs processing world: world
    17:46:18 [INFO] bMobs processing world: games
    17:46:18 [INFO] bMobs could not access a world yet! It may still be loading.
    17:46:18 [INFO] bMobs processing world: world
    17:46:18 [INFO] bMobs processing world: games
    17:46:18 [INFO] bMobs could not access a world yet! It may still be loading.
    17:46:18 [INFO] [ServerPort] loading: nether;nether
    17:46:18 [INFO] bMobs processing world: world
    17:46:18 [INFO] bMobs processing world: games
    17:46:18 [INFO] bMobs processing world: nether
    17:46:18 [INFO] bMobs could not access a world yet! It may still be loading.
    17:46:18 [INFO] bMobs processing world: world
    17:46:18 [INFO] bMobs processing world: games
    17:46:18 [INFO] bMobs processing world: nether
    17:46:18 [INFO] bMobs could not access a world yet! It may still be loading.
    17:46:18 [INFO] [ServerPort] loading: oldworld
    17:46:18 [INFO] bMobs processing world: world
    17:46:18 [INFO] bMobs processing world: games
    17:46:18 [INFO] bMobs processing world: nether
    17:46:18 [INFO] bMobs processing world: oldworld
    17:46:19 [INFO] bMobs processing world: world
    17:46:19 [INFO] bMobs processing world: games
    17:46:19 [INFO] bMobs processing world: nether
    17:46:19 [INFO] bMobs processing world: oldworld
     
  20. Offline

    Robert Brinton

    I just loaded the 0.5.6 version and I do see worlds processed more than once, but all of the java exceptions are gone, the configuration file looks right and the plugin is working.
     
  21. [MERGETIME="1299726556"][/MERGETIME]
    OOppppsss, sorry CoteRL
    posted my reply in your original post window above - hope you can make sense of it though ........
    Posted again below just in case ........

    Hi, just started using this plugin today to get rid of the on-going Slime issue - works great for me (using bukkit #522) Thanks for a fantastic plugin (don't know why Slimes were turned on again anyway)

    In answer to CoteRL, I have had exactly this problem with this plugin - fortunately, I've come across it before - easy to fix. Bukkit loads plugins alphabetically by their name. My worlds get loaded by WorldWorp plugin - which of course begins with a 'W', hence my worlds hadn't loaded when 'b'mobs was trying to process my other worlds. By renaming 'bmobs.jar' to 'xbmobs.jar', 'X' comes after 'W', and now I don't get any errors in my console and bmobs works perfectly.

    ...... hope this makes sense and works for you
     
  22. Offline

    haugli92

    Ye, just download. Still have same problem. Need to have this plugin fast :p i cant watch my players buildings being destroyed :p
     
  23. Offline

    o0AzzA0o

    Doesnt work fails to load the plugin on latest recommended build
     
  24. Offline

    Persioncool

    Oh my god. I got scared to death! A spider jumped right in front of me :(
    Please can you update it, I want to have the mobs without spiders!
     
  25. Offline

    davr

    Have you gotten this to work on squids? I need to disable squid in one of my multiworlds (it's solid water, 500+ squids spawn, and lag the clients to death). I have this in my bMobs.properties:

    world:eek:cean
    creeper
    skeleton
    spider
    zombie
    ghast
    giant
    pigzombie
    slime
    chicken
    cow
    sheep
    pig
    #squid

    but squids are still spawning like crazy
     
  26. Offline

    o0AzzA0o

    [SEVERE] Could not load plugins/xMobs.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:69)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:135)
    at java.util.jar.JarFile.<init>(JarFile.java:99)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:56)
    ... 8 more
     
  27. Offline

    Flamingsword

    Are you gonna renew you'r website subscription please?
    or use another uplading service.. cause i need this plugin D:
     
  28. Offline

    Brad811

    Haha yeah at this point it's gonna take donations for me to keep spending time developing, updating, and hosting this plugin. It takes a decent amount of time and effort.
     
  29. But for now you can upload the plugin on a free host like mediafire or dropbox, like most ppl do.
     
  30. Offline

    adhdaan

    server down ???
     
  31. Offline

    TheNander

Share This Page