Inactive [FUN/MISC] zombieattack v0.4 - Zombies will break blocks to get to you [803+] Working in 1.6

Discussion in 'Inactive/Unsupported Plugins' started by JoeJoeMcBean, Apr 15, 2011.

  1. Offline

    JoeJoeMcBean

    zombieattack - Zombies will break blocks to get to you
    Version: v0.4
    Uses Permissions (Tested with v3.0.3).​
    Honors WorldGuard regions (Tested with 5.0-alpha10).​

    0.4 -
    Improvement on zombie digging. Seems to work much better, and doesn't get the block stuck at the feet.
    Also added some logic around the null thread issues that creep up, looking for feedback please.
    Additional note on permissions. I had to add - 'zombieattack.user.enabled' to the Default group to get it to work. Relying on '*' inheritence from Admins didn't seem to do the trick.

    Description:
    Want to add some additional difficulty to survival? This plugin will allow zombies to break blocks of your choice to get to the targetted player. You choose the blocks you want zombies to be able to break and the time in seconds it takes for the zombie to break that block type. WorldGuard can be used to protect regions from zombieattacks. Permissions lets you set what player/group is under attack.

    The default enabled settings in blocks.config (block type, time to break):
    Show Spoiler

    DIRT,4
    GRAVEL,3
    GRASS,4
    LEAVES,3
    SAND,3
    COBBLESTONE,5
    WOODEN_DOOR,5
    WOOD_DOOR,5
    WOOD,5
    FENCE,5
    SNOW_BLOCK,2
    WOOL,3
    GLASS,2

    For example: A zombie targets you in your sand walled home. The zombie will come up to the wall and in 3 seconds will break out that block of sand in front of it. This will continue until one of you are dead or you leave the server.

    Download jar here (or from the attached file below):
    zombieattack.jar

    Installation:
    Copy the zombieattack.jar file to your plugins directory. The plugin will create the plugins/zombieattack folder, zombieattack.config, and blocks.config with default settings.

    Features:
    Honors WorldGuard regions, can set which regions zombie's do not attack.​
    Set permissions for players/groups under zombie attack.​
    Customizable breakable block list with timers. Full list here under Enum Constant Summary section.​
    Source included in the jar.​

    Permissions:
    Show Spoiler

    zombieattack.user.*​
    zombieattack.user.enabled​

    TODO:
    Show Spoiler

    Multiworld support (work started)​
    code clean up​

    Changelog:
    Show Spoiler

    Version 0.3
    Fixed the non-breaking blocks when worldguard is enabled but zombie not in a region.​
    Fixed that ENTITY_TARGET spam​
    Version 0.2
    Allows for not having WorldGuard and/or Permissions​
    Version 0.1
    Release​
     

    Attached Files:

  2. Offline

    Ratchet

    whenever I spot a zombie and it comes for me, my game lags to high hell, and the console is spamming this:

    Code:
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-23"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:07 [SEVERE]     at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 12:56:07 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-27"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:07 [SEVERE]     at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 12:56:07 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-26"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:07 [SEVERE]     at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 12:56:07 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-22"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:07 [SEVERE]     at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 12:56:07 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-43"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:07 [SEVERE]     at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 12:56:07 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-16 12:56:07 [SEVERE] Exception in thread "Thread-69"
    2011-04-16 12:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-73"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-80"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-86"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-92"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-96"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-100"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-81"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-83"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-114"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-112"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-110"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-108"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-106"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-116"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-87"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-91"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-95"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-97"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-103"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-119"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-123"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-127"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-131"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-135"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-130"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-120"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-115"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-111"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-107"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-99"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-124"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:08 [SEVERE] Exception in thread "Thread-138"
    2011-04-16 12:56:08 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:09 [SEVERE] Exception in thread "Thread-158"
    2011-04-16 12:56:09 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:09 [SEVERE] Exception in thread "Thread-162"
    2011-04-16 12:56:09 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:09 [SEVERE] Exception in thread "Thread-159"
    2011-04-16 12:56:09 [SEVERE] java.lang.NullPointerException
    2011-04-16 12:56:09 [SEVERE] Exception in thread "Thread-163"
    2011-04-16 12:56:09 [SEVERE] java.lang.NullPointerException
    i'm running 677


    plugins I have are:

    AnyoneSleep v1.0
    ApiCraft v0.2
    AutoPlant v1.51
    Dynmap v0.15
    FastObby v1.0
    Lockette v1.3.4
    MCDocs v7.1
    MultiVerse v1.6.2
    Nethrar v1.2
    Netstats v4.0
    Permissions v2.7
    SimpleHome v1.5
    SlowHealth v3.1.0
    zombieattack v0.2
     
  3. Offline

    Nytemare3701

    Request: Residence support.
     
  4. Offline

    Legolas75893

    Also, request: LWC support?

    Have you played on the server yet?
     
  5. Offline

    JoeJoeMcBean

    @Ratchet ,
    Thanks for the report. I'll add those plugins on my test box and see what happens. All those 'threads' get launched when the entitytarget event occurs (should only be one). So it seems you are getting targetted repeatedly but its getting through my 'is it a zombie' check but there is nothing really targeting you so it fails in the run thread? strange. I'll get to work!

    BUG: Also noticed that creepers tend to make some server error spam, also looking into that.

    @Everyone - I'm interested in hearing if it WORKS for your server setup as well. Any feedback is appreciated.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  6. Offline

    thepackett

    Hey, could you make it so that maybe you could optionally designate a zombie attack in a particular world so that any zombie can break blocks to get to any player?
    I think that would be epic instead of having a zombie attack on single player.

    Also as another suggestion adding a gametype like feature where it's humans vs. zombies and players can get infected and join their non-player zombies in their quest to zombify everything :D
    (if you do this please make it so that there is a way to tell who is and isn't a zombie)

    this would make this epic :D
     
  7. Offline

    JoeJoeMcBean

    @Spl1tz ,
    I think I found a possible reason why zombie's not breaking blocks.
    If you have worldguard installed and worldguard_allowed_region=(blank) but are not in a defined region the code tells the zombie to not break. The behavior should be the other way around.

    I'll fix this and get an update out. I messed that up when I was working to support not having permissions or WG installed.

    Sorry about the inconvenience.
     
  8. Offline

    Monkah

    2011-04-15 20:01:36 [SEVERE] Could not pass event ENTITY_TARGET to zombieattack
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftCreeper cannot be cast to org.bukkit.entity.Player
    at com.mcbean.zombieattack.zombieattackEntityListener.onEntityTarget(zombieattackEntityListener.java:21)
    at org.bukkit.plugin.java.JavaPluginLoader$46.execute(JavaPluginLoader.java:482)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
    at net.minecraft.server.EntityMonster.a(EntityMonster.java:58)
    at net.minecraft.server.Explosion.a(Explosion.java:152)
    at net.minecraft.server.World.a(World.java:1216)
    at net.minecraft.server.WorldServer.a(WorldServer.java:114)
    at net.minecraft.server.EntityCreeper.a(EntityCreeper.java:93)
    at net.minecraft.server.EntityCreature.c_(EntityCreature.java:68)
    at net.minecraft.server.EntityLiving.r(EntityLiving.java:653)
    at net.minecraft.server.EntityMonster.r(EntityMonster.java:30)
    at net.minecraft.server.EntityLiving.f_(EntityLiving.java:231)
    at net.minecraft.server.EntityMonster.f_(EntityMonster.java:34)
    at net.minecraft.server.EntityCreeper.f_(EntityCreeper.java:51)
    at net.minecraft.server.World.a(World.java:983)
    at net.minecraft.server.WorldServer.a(WorldServer.java:52)
    at net.minecraft.server.World.f(World.java:965)
    at net.minecraft.server.World.e(World.java:942)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:365)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  9. Offline

    MineralMC

    +1 CB677, ZombieAttack 0.2
    http://plugs.failhouse.net
     
  10. Offline

    JoeJoeMcBean

    Awesome thanks guys.
    Fixed the non-breaking blocks when worldguard is enabled but zombie not in a region.
    Still looking into @Ratchet thread issues and ENTITY_TARGET spam.

    UPDATE: think ENTITY_TARGET spam gone too.
    v0.3 is out.
     
  11. Offline

    Ratchet

    looking forward to the fix! :)
     
  12. Offline

    JoeJoeMcBean

    @Ratchet , @Monkah , @MineralMC try out v.03 (re-download if you already have, I uploaded wrong one for a few minutes there)
    I'm wondering if the target entity check fix helps?
     
  13. Offline

    T1tan1umTurtl3

    what a nice plug in i im puting this on my server, i can see my frends cry as zombies brake through there walls.
    grate revenge for filling my house with [tnt]TNT [tnt]
    all so if u use Mob Limiter u can tern of all mobs but zombies
     
  14. Offline

    MineralMC

    Seems to have fixed the targeting error. :)

    com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 21:10:42 [SEVERE] at java.lang.Thread.run(Unknown Source)
    2011-04-16 21:10:42 [SEVERE] Exception in thread "Thread-38149"
    2011-04-16 21:10:42 [SEVERE] java.lang.NullPointerException
    2011-04-16 21:10:42 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 21:10:42 [SEVERE] at java.lang.Thread.run(Unknown Source)
    2011-04-16 21:10:42 [SEVERE] Exception in thread "Thread-38150"
    2011-04-16 21:10:42 [SEVERE] java.lang.NullPointerException
    2011-04-16 21:10:42 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 21:10:42 [SEVERE] at java.lang.Thread.run(Unknown Source)
    2011-04-16 21:10:42 [SEVERE] Exception in thread "Thread-38152"
    2011-04-16 21:10:42 [SEVERE] java.lang.NullPointerException
    2011-04-16 21:10:42 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 21:10:42 [SEVERE] at java.lang.Thread.run(Unknown Source)
    2011-04-16 21:10:42 [SEVERE] Exception in thread "Thread-38154"
    2011-04-16 21:10:42 [SEVERE] java.lang.NullPointerException
    2011-04-16 21:10:42 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)
    2011-04-16 21:10:42 [SEVERE] at java.lang.Thread.run(Unknown Source)

    Doesn't seem to like admins using Friendlies nor players using PoweredArmour's "ENTITY_TARGET" protection. Spits out roughly 20 of these 'exception in thread' errors a second, crashed the server twice.
     
  15. Offline

    JoeJoeMcBean

    Glad we're getting closer. I'll take a look at Friendlies and PoweredArmour. Thanks for the tip!

    Yeah, I definetly get those thread errors with friendlies installed.. not so friendly huh... :p
    (j/k @fullwall , Your stuff is awesome and I'm a big fan)

    I'll look into it right now, hopefully its something easy to work around so we can get you up and running!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  16. Offline

    MineralMC

    Cheers for the quick response. :) Another player - who was neither affected by friendlies nor powerarmour at the time - was also getting the thread error spam; I'm hoping it's just because friendlies is on the server, and not some other problem.
     
  17. Offline

    JoeJoeMcBean

    Okay, I think this is what I'm seeing so far -
    Friendlies uses the same event as zombieattack, but in that code it cancels the target event to make the creatures friendly. When that happens zombieattack can't do it's .run stuff right since the event is null.

    I can override that by un-canceling the event, but that would probably mess up the whole purpose of friendlies.
    The better fix is to not use the friendlies.zombie.* permissions node.

    When I am admin I get the event thread spam because my permissions are *, which includes all the friendlies nodes.
    Looking at permissions wiki it seems we should be able to say
    permissions:
    - '-friendlies.zombie.*'

    and that should un-permission the zombies, but I couldn't seem to get it to work for me (yet?).

    Can you confirm it's only your admins with '*' or people with 'friendlies.zombie.*' that are causing this issue?

    Thanks!
     
  18. Offline

    thepackett

    Do you think you would be able to make it so you can initiate a zombie attack in a particular world instead of just a single player?
    (unless i'm misunderstanding the meaning of "targeting a player" but the question to do it in just one world still stands)
     
  19. Offline

    televire

    it was a very fun mod :D

    Just got to remember to remove the mod whenever I swap worlds. :/

    I changed every block destroy time to 1 second, it was almost impossible to live, so we just built a raised platform and hid out of reach. :D
     
  20. Offline

    JoeJoeMcBean

    So in a sense are you saying you want the randomly spawned zombies that just wander around to also be breaking down anything in their way?
     
  21. Offline

    thepackett

    Not quite, i thought that "Targeting a player" meant using a command to target a specific player rahter htan a monster targeting a player walking by. But can you initiate a zombie attack where zombies can break blocks when targeting players in a specific world? or is it server wide?
     
  22. Offline

    JoeJoeMcBean

    By targetted player I meant the normal behavior of a mob targeting the closest player, not a command.
    I'm not totally up to speed on multi-world nuances, but plan on it.

    Does that help. I don't feel like I'm quite understanding your question yet, sorry! lol
     
  23. Offline

    Legolas75893

    Thank you again JoeJoe, we love the plugin! Please come on sometime soon! <3 <3 <3. Also, LWC please?
     
  24. Offline

    Monkah

    When my server finally goes up, we're going to have a hell of a time.

    Hey, for the "bonus" features, could you add zombie spawnrate?

    Thanks,
    - Monkah

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  25. Offline

    davr

    Multi-world support would be my request (basically only make zombieattack apply to some worlds but not others). Looks cool though!
     
  26. Offline

    kahlilnc

    I know this is not what the plugin does but can you consider my request? Can you make zombies faster? And change the damage done by them configurable?
     
  27. Offline

    Elaeth

    I am currently not using permissions or worldguard on my server and I cannot seem to get zombieattack to work, I made a small house out of dirt with a wooden door to test it, used the default files too and nothing happened, set dirt destruction time to 1 second, still nothing. I then tried adding a * after WORLDGUARD_ALLOWED_REGIONS=
    in the zombieattack config file hoping that would do something, still nothing. What am I doing wrong? I currently have no other plugins that affect block destruction and none that set areas like world guard. Could you perhaps give me an example of a config file setup that would allow this plugin to work without permissions or world guard? Cheers :)
    I get this too in the log

    2011-04-18 15:12:51 [SEVERE] at java.lang.Thread.run(Unknown Source)

    2011-04-18 15:12:51 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)

    2011-04-18 15:12:51 [SEVERE] java.lang.NoSuchMethodError: org.bukkit.entity.Creature.isDead()Z

    2011-04-18 15:12:51 [SEVERE] Exception in thread "Thread-10"

    2011-04-18 15:12:40 [SEVERE] at java.lang.Thread.run(Unknown Source)

    2011-04-18 15:12:40 [SEVERE] at com.mcbean.zombieattack.zombieattackHandler.run(zombieattackHandler.java:32)

    2011-04-18 15:12:40 [SEVERE] java.lang.NoSuchMethodError: org.bukkit.entity.Creature.isDead()Z

    2011-04-18 15:12:40 [SEVERE] Exception in thread "Thread-9"
     
  28. Offline

    JoeJoeMcBean

    @Elaeth , thanks for the info. I'll check into it. I tried to put some logic in to use worldguard and permissions but to not require them. I probably goofed something up - I'll get back to you soon!

    @davr , Looking into multiworld support!

    @kahlilnc , I will also look into zombie type changes as well for future updates.

    @all, thanks everyone for your interest and feedback!
     
    thecoolwolf and kahlilnc like this.
  29. Offline

    Legolas75893

    Hey you're back :D
     
  30. Offline

    JoeJoeMcBean

    @Elaeth , I installed on a clean cb677 server and do not seem to get any errors.

    Are you running any other plugins and what build of craftbukkit?
     
  31. Offline

    kahlilnc

    I know your server :). I left a Application a few days ago and no one whitelisted me :'(.
     

Share This Page