[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. Request: display the number of mobs killed with the various commands, especially for specific creatures. Would give me an idea of how the probability is working out, ty!
     
  3. Offline

    Brad811

    Updated to 1.1!
    Done!
    Done!
     
  4. Offline

    Sparky20

    Awesome, Thanks!
     
  5. Seeing you're handy with mobs...is there any way you could use this to boost monster damage? Sadly, on a full server, monsters become so slow they are mostly laughed at, perhaps if I could just increase their damage output ;>
     
  6. Offline

    DarKMaKa

    I have this error on loading server:
    Code:
    2011-05-20 14:34:50 [WARNING] Task of 'bMobs' generated an exception
    java.lang.NullPointerException
    at com.bradsproject.BradleyJewell.bMobs.bMobs.handleEntity(bMobs.java:161)
    at com.bradsproject.BradleyJewell.bMobs.bMobsKillerTask.run(bMobsKillerTask.java:31)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:360)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Here my YML config:

    Code:
    ##
    # Example bMobs.yml
    ##
    worlds:
        world:
            skeleton:
                enabled: true
                aggressive: true
                burn: false
                health: 2
            zombie:
                enabled: true
                probability: 0.8
                aggressive: false
                burn: false
                health: 10
            spider:
                enabled: true
                probability: 0.6
                burn: false
                health: 10
            creeper:
                enabled: true
                probability: 0.5
                burn: false
                health: 5
            ghast:
                enabled: false
            giant:
                enabled: true
                probability: 0.3
                burn: false
            pigzombie:
                enabled: false
            slime:
                enabled: false
            #---------- Animals ----------------
            chicken:
                enabled: true
                probability: 1
            cow:
                enabled: true
                probability: 1
            sheep:
                enabled: true
                probability: 1
            pig:
                enabled: true
                probability: 1
            squid:
                enabled: true
                probability: 1
        Nether:
            skeleton:
                enabled: false
            zombie:
                enabled: false
            spider:
                enabled: false
            creeper:
                enabled: false
            ghast:
                enabled: false
            giant:
                enabled: false
            pigzombie:
                enabled: false
            slime:
                enabled: false
            #---------- Animals ----------------
            chicken:
                enabled: false
            cow:
                enabled: false
            sheep:
                enabled: false
            pig:
                enabled: false
            squid:
                enabled: false
        darkworld:
            skeleton:
                enabled: false
            zombie:
                enabled: false
            spider:
                enabled: false
            creeper:
                enabled: false
            ghast:
                enabled: false
            giant:
                enabled: false
            pigzombie:
                enabled: false
            slime:
                enabled: false
            #---------- Animals ----------------
            chicken:
                enabled: false
            cow:
                enabled: false
            sheep:
                enabled: false
            pig:
                enabled: false
            squid:
                enabled: false
    ##
    #   [mob type]:
    #       enabled: [true/false]
    #       probability: [0.0-1.0]
    #       aggressive: [true/false]
    #       burn: [true/false]
    #       health: [0-200]
    ##

    Also, is that possible to make an option to control the global number of mobs?
     
  7. Offline

    EpicATrain

    Hey, i can't use this plugin until these errors are fixed:

    Code:
    [INFO] Done (0.474s)! For help, type "help" or "?"
    2011-05-20 08:10:52 [WARNING] Task of 'bMobs' generated an exception
    java.lang.NullPointerException
        at com.bradsproject.BradleyJewell.bMobs.bMobs.handleEntity(bMobs.java:161)
        at com.bradsproject.BradleyJewell.bMobs.bMobsKillerTask.run(bMobsKillerTask.java:31)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:360)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-20 08:10:54 [INFO] [BBROTHER] Cleaned out 0 records because of age in 0h00m00s.
    2011-05-20 08:11:00 [INFO] EpicATrain [/24.160.198.78:50363] logged in with entity id 409
    2011-05-20 08:11:24 [INFO] §9[PLAYER_COMMAND] EpicATrain: /spawnmob spider
    2011-05-20 08:11:34 [INFO] §9[PLAYER_COMMAND] EpicATrain: /spawnmob creeper
    2011-05-20 08:11:34 [SEVERE] Could not pass event ENTITY_TARGET to bMobs
    java.lang.NullPointerException
        at com.bradsproject.BradleyJewell.bMobs.bMobs.handleEntity(bMobs.java:158)
        at com.bradsproject.BradleyJewell.bMobs.bMobsEntityListener.onEntityTarget(bMobsEntityListener.java:32)
        at org.bukkit.plugin.java.JavaPluginLoader$52.execute(JavaPluginLoader.java:548)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
        at net.minecraft.server.EntityCreature.c_(EntityCreature.java:35)
        at net.minecraft.server.EntityLiving.u(EntityLiving.java:657)
        at net.minecraft.server.EntityMonster.u(EntityMonster.java:30)
        at net.minecraft.server.EntityLiving.p_(EntityLiving.java:231)
        at net.minecraft.server.EntityMonster.p_(EntityMonster.java:34)
        at net.minecraft.server.EntityCreeper.p_(EntityCreeper.java:57)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1009)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:53)
        at net.minecraft.server.World.playerJoinedWorld(World.java:991)
        at net.minecraft.server.World.cleanUp(World.java:968)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:369)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-20 08:11:46 [INFO] §9[PLAYER_COMMAND] EpicATrain: /time day
    
    My config file:

    Code:
    ##
    # Example bMobs.yml
    ##
    worlds:
        offc:
            skeleton:
                enabled: true
            zombie:
                enabled: true
            spider:
                enabled: true
                burn: true
            creeper:
                enabled: true
                burn: true
    
    ##
    #   [mob type]:
    #       enabled: [true/false]
    #       probability: [0.0-1.0]
    #       aggressive: [true/false]
    #       burn: [true/false]
    #       health: [0-200]
    ##
     
  8. Offline

    tremor

    So how does the probability work? For the matter the entire subset of settings, do you have a list of the naturally occurring defaults so that we may use them as a basis for adjustment?

    Another addition could be damage - then this plugin could replace the smpdiffulty plugin which seems to be inactive.

    Is spider jockey also spawnable with this, it would be nice to increase their probability?

    If I make a chicken aggressive will it attack people because that would be cool?
     
  9. Offline

    Brad811

    Haha yes, this is possible.

    I am unable to recreate the null pointer exceptions y'all are getting, but I will keep trying. If you downloaded the plugin before 6am today, you may have gotten a bad copy.

    Probability: say you set probability of spiders to 0.8. When a spider spawns, 8 out of 10 times the spider will just spawn. But 2 out of 10 times the spider spawn will be cancelled.

    Anything you don't specify in your yml file will assume the default minecraft behavior. So you don't have to put a bunch of lines to enable different creatures or set all their probabilities to 1. If you want it to be the minecraft usual, don't specify it.

    This plugin isn't actually spawning the creatures, its just controlling what happens when they do.
     
  10. Offline

    EpicATrain

    The burn doesn't work btw.
     
  11. Offline

    Brad811

    How so, I've got burning spiders and non-burning zombies over here
     
  12. Offline

    tremor

    Oh so this wont spawn a pig zombie or a giant on a normal world? :(
     
  13. Offline

    Mannan

    If I enable giants, will they spawn regularly like animals and mobs?
     
  14. On reloads, in 798:

    17:35:52 [WARNING] Task of 'bMobs' generated an exception
    java.lang.NullPointerException
    at com.bradsproject.BradleyJewell.bMobs.bMobsKillerTask.run(bMobsKillerTask.java:25)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:365)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  15. Offline

    Thyraxxx

    hey would it be possible to incrase the spawn rate of mob ? and incrase the limit also ?
     
  16. Offline

    moonjokes

    If you could make this use regions I would love you forever!
     
  17. REQUEST:
    tamed wolves don't die from /bkill animals
    also, that error dosen't actually appear to mean anything, all commands and blocks work fine
     
  18. Offline

    Frapl

    works like a charm :) great work!

    how about something non-aggressive mobs try to defend themselves when attacked by players? currently they just do nothing when they are non-aggressive. that's ok but it should be possible to get them angry. ^^

    for example
    aggressive: false
    defend: true
     
  19. Offline

    xXChaosWorldXx

    i kinda skimmed the comments but can you make it so that stuff like... creepers burn in rain?
     
  20. Offline

    Roycohen

    can you make it so when in permisons you can set mobs to only target certain people or anyone thats not an admin and such :)
     
  21. Offline

    heroanth2345

    Why? Don't admins have the god mode or something like that? (If you have worldguard or essentials)
     
  22. Offline

    Roycohen

    yea but im trying to use mobs as an army to protect my castel and i dont want them to target and attack me all the time that would get annoying :)
     
  23. Offline

    heroanth2345

    Wow, that must be awesome!
     
  24. Offline

    footwo

    Does this actually work with Giants? This is my config:

    Code:
    worlds:
        Midgard:
            skeleton:
                enabled: true
                aggressive: true
                burn: true
                health: 20
            zombie:
                enabled: true
                probability: 0.5
                aggressive: true
                burn: true
                health: 20
            spider:
                enabled: true
                probability: 0.2
                burn: false
                health: 30
            creeper:
                enabled: true
                probability: 0.1
                burn: false
                health: 20
            sheep:
                enabled: true
            pig:
                enabled: true
            chicken:
                enabled: true
            cow:
                enabled: true
            squid:
                enabled: true
                probability: 0.1
            giant:
                enabled: true
                probability: 0.1
                aggressive: true
                health: 200
    
        muspelheim:
            ghast:
                enabled: true
                probability: 0.1
                aggresive: true
                health: 100
            pigzombie:
                enabled: true
                probability: 0.5
                health: 10
    
        spawnworld:
            skeleton:
                enabled: false
            zombie:
                enabled: false
            spider:
                enabled: false
            creeper:
                enabled: false
            sheep:
                enabled: true
            pig:
                enabled: true
            chicken:
                enabled: false
            cow:
                enabled: true
            squid:
                enabled: false
            giant:
                enabled: false
    It seems to work fine for the other mobs, but giants just will not spawn day or night. Trying to /bkill them always shows 0 giants have been killed.

    It's a normal world, not a nether.
     
  25. Offline

    Brad811

    This plugin does no artificially spawn mobs, it just controls what happens when they do.
     
  26. Offline

    footwo

    Mmkay so how do I get giants to spawn :D
     
  27. Offline

    EpicATrain

    Can you create a command (preferabbly a sign) that will kill all mobs in an area/radius every X seconds/minutes? I've created a monster spawner and I don't want it to get out of control.
     
  28. Offline

    Kruemelkatze

    Is possible to disable ordinary mob spawns (at night and unlit places) but still let monster spawners work?
     
  29. Offline

    Revelator

    Does aggressive: false make monsters neutral (as in they attack you if you attack them) or don't they attack at all ?
    If second, would it be a possibility of making them neutral ?

    I kinda like having neutral creepers during daytime, and walking bombs at night.
     
  30. Offline

    Cognito guy

    I'm getting this bug in one off my worlds about every 30 seconds:

    It doesn't work at all in that world. I checked the difference between the worlds and I could see that the world with the problem didn't have a folder in it named "DIM-1" I don't know what that means, but could that be the problem?

    please help.

    EDIT:

    Also doesn't work in the other world
    (creepers still aggressive)

    also when I start up the server I get this error:

     
  31. Offline

    Mannan

    Getting this same problem. On build 818, MC 1.6.6.
     

Share This Page