[INACTIVE] [FUN/MECH] Door Shield v1.3 - block attacks with an iron door [1000]

Discussion in 'Inactive/Unsupported Plugins' started by marinating, May 7, 2011.

  1. Offline

    marinating

    Door Shield!
    Version: 1.0

    The Door Shield does exactly what it says. When an iron or wooden door is held in your hand, you will block a hit from other players or mobs with a certain probability (default is 1/3 of the time, can be changed in config). The probability of blocking is doubled when you sneak.

    Features:
    * Extremely simple, lightweight plugin.
    * Have a use for that extra iron!
    * Configurable with any probability (uses doubles, so you could have 1/3.14159256535 if you wish)
    * It's a door. That blocks hits for you. You can't ask for anything more in life.
    * Permissions! Add 'door.shield' to enable door shielding.
    * Shielding with wooden and iron doors!
    * Configurable breaking probability!

    <Edit by Moderator: Redacted mediafire url>

    Source code coming soon.

    Changelog
    Version 1.0
    * Release

    Version 1.0.1
    * Permissions

    Version 1.3
    * Fixed a glitch where the user would be healed
    * Added wooden doors
    * Updated config file to reflect probability that doors will break
     
    Last edited by a moderator: Dec 14, 2016
    Codex Arcanum, rdemanta, HSAR and 2 others like this.
  2. Offline

    SalamiJack

    Just have an Entity listener that listens for damage. If the player attacking isSneaking() and getItemInHand = Iron door then apply a backwards velocity to the person being attacked.
     
  3. Offline

    anon

    I Found the bug. If you are hit by any mob it will work fine, but if you are hit by skeleton arrow, it will heal you a heart each.
     
  4. Offline

    marinating

    I'm not sure why this happens because I'm cancelling the damage by cancelling the damage event itself. I'll look into it later if I have time (lots of work to do tonight).
     
  5. Offline

    Blackstorm72

    Def. something i'm looking at with our massive Levelcraft survival world, Sirius.

    Surprisingly, this will be very popular in our world :) - Will be watching ;)
     
  6. Offline

    anon

    Hmm, it was not only the skell arrow. Testing on some pvp, I got the restoring life bug again. Seems to happens with anything that deals more damage then 1.

    If AA mob hit me, and It gets a display message "Your shield has protected you of ' of damage", then it works fine.
    But if a skell hits me, it displays that shield protected me of 2 damage, then I am healed more than I had. If on pvp with swords, message says "shield protected me of 3 damage", then I am healled A LOT! My char gets full health, and it continues to rise with every hit, even if its highter then the limit.
     
  7. Offline

    marinating

    Coming soon:
    • Fixing the healing glitch
    • Wooden doors
    • Chance of breaking
    Coming later:
    • Knockback
     
  8. Offline

    anon

    Good to know :D
     
  9. Offline

    marinating

    The code is done but needs testing. Is anyone willing to let me use their server as a test platform? :D
     
  10. Offline

    anon

    I can test it for ya:D
     
  11. Offline

    marinating

    What's your server ip? I'll PM you the download link.

    Updated to 1.3 with wooden doors and breakability. Fixed healing glitch.

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

    msw1

    You can use mine. 76.22.48.185
     
  13. Offline

    marinating

    I've already tested/updated, but thanks anyways.
     
  14. Offline

    Kainzo

    Totally adding this into the Permission-skills of Heroes test ;) for the warrior haha.
     
  15. Offline

    WooJoo

    just a idea but how about using a item next to the shield:::

    like you need to use slot number 1 to use the shield and the item of slot 2 will be used as weapon
    even if you cant show the attack you can at least deal the proper damage

    would that be possible?
     
  16. Offline

    marinating

    It's possible but it may cause balance issues. I can probably make it happen, although probably not under this same plugin- attacking with an item in your inventory doesn't feel very DoorShieldy to me.
     
  17. Offline

    marinating

    @WooJoo: I've tried your plugin idea but it doesn't work at the moment because there's no way to grab to amount of damage an item does from its ItemStack or MaterialData information.

    @Empty22: Thanks! I'm flattered. Did it end up working with McMMO?
     
  18. Offline

    anon

    Working good for me on 820 :)
     
  19. Offline

    marinating

    Great, updated the thread title.
     
  20. Offline

    kahlilnc

    This is not compatible with permissions 3.0+
     
  21. Offline

    marinating

    Hmm... I'll look into fixing that soon.
     
  22. Offline

    ddubois89

    Hope you fix permissions problem soon, I want to add this to my new server!
     
  23. Offline

    sagethor

    Hehe. This plugin makes me think of shield bashing people in the face while in combat.
     
  24. Offline

    Kevger

    Please 953 support ;)
     
  25. Offline

    marinating

    There's no reason why it wouldn't work with 953.
     
  26. Offline

    VanillaSnack

    not working for me... put in plugins... tried both but no /dg command works...
     
  27. Offline

    marinating

    Post Demigods questions in the Demigods thread.
     
  28. Offline

    Codex Arcanum

    First off: this plugin is great!

    Second: I get mysterious errors when I use this plugin with CustomDifficulty. Any clue why?

    Errors:
    Show Spoiler

    2011-07-13 20:11:46 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-904-g9277096-b953jnks (MC: 1.7.2)
    2011-07-13 20:11:47 [SEVERE] java.lang.IllegalAccessError: tried to access class com.nijiko.permissions.ModularControl$RefreshTask from class com.nijiko.permissions.ModularControl
    2011-07-13 20:11:47 [SEVERE] at com.nijiko.permissions.ModularControl.<init>(ModularControl.java:64)
    2011-07-13 20:11:47 [SEVERE] at com.nijikokun.bukkit.Permissions.Permissions.setupPermissions(Permissions.java:179)
    2011-07-13 20:11:47 [SEVERE] at com.nijikokun.bukkit.Permissions.Permissions.onLoad(Permissions.java:133)
    2011-07-13 20:11:47 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:121)
    2011-07-13 20:11:47 [SEVERE] at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:89)
    2011-07-13 20:11:47 [SEVERE] at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
    2011-07-13 20:11:47 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:132)
    2011-07-13 20:11:47 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    2011-07-13 20:11:47 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-13 20:11:47 [SEVERE] [Permissions] Unable to load permission data.
    2011-07-13 20:11:47 [SEVERE] [Permissions] Shutting down Permissions due to error(s).
    2011-07-13 20:11:47 [INFO] [Permissions] (Yeti) was initialized.
    2011-07-13 20:11:47 [INFO] [Permissions] (Yeti) disabled successfully.
    2011-07-13 20:11:47 [INFO] Preparing level "world6"
    2011-07-13 20:11:47 [INFO] Preparing start region for level 0 (Seed: -1333211981373910477)
    2011-07-13 20:11:48 [INFO] Preparing start region for level 1 (Seed: -1784338777788894343)
    2011-07-13 20:11:48 [INFO] Preparing spawn area: 24%
    2011-07-13 20:11:48 [INFO] Appleseed: ShowErrorsInClient=true
    2011-07-13 20:11:48 [INFO] Appleseed: DropInterval=120 seconds
    2011-07-13 20:11:48 [INFO] Appleseed: WandItem=wood_hoe
    2011-07-13 20:11:48 [INFO] Appleseed: FertilizerItem=bone_meal
    2011-07-13 20:11:48 [INFO] Appleseed: MinimumTreeDistance=disabled
    2011-07-13 20:11:48 [INFO] Appleseed: TreeTypes=(cocoa_beans,apple)
    2011-07-13 20:11:48 [INFO] Appleseed: Permissions 3.1.6 found
    2011-07-13 20:11:48 [INFO] Appleseed: WorldGuard 5.2.2 found
    2011-07-13 20:11:48 [INFO] Appleseed: 0 trees loaded in world world6.
    2011-07-13 20:11:48 [INFO] Appleseed: 0 trees loaded in world world6_nether.
    2011-07-13 20:11:48 [INFO] Appleseed version 0.6.1 is enabled!
    2011-07-13 20:11:48 [INFO] [AutoPlant] version 1.6 is enabled!
    2011-07-13 20:11:48 [INFO] [BackToBody] v2.3 has been enabled.
    2011-07-13 20:11:48 [INFO] [bCoolDown] version 1.3.1 is enabled!
    2011-07-13 20:11:49 [INFO] [bCoolDown] Permission system found
    2011-07-13 20:11:49 [INFO] [BedHeal]: starting...
    2011-07-13 20:11:49 [INFO] [Bedheal]: started!
    2011-07-13 20:11:49 [INFO] [BBROTHER] ------------------------------------
    2011-07-13 20:11:49 [INFO] [BBROTHER] Hello, and thank you for using the TESTING version of BigBrother!
    2011-07-13 20:11:49 [INFO] [BBROTHER] Please note that, since this is far from complete, there will be many bugs.
    2011-07-13 20:11:49 [INFO] [BBROTHER] IF YOU FIND ANY BUGS, PLEASE REPORT THEM ON http://bugs.nexisonline.net/bb
    2011-07-13 20:11:49 [INFO] [BBROTHER] Please stay tuned in irc.esper.net #bigbrother for updates and build notifications.
    2011-07-13 20:11:49 [INFO] [BBROTHER] ------------------------------------
    2011-07-13 20:11:50 [INFO] [BBROTHER] Building `bbdata` table...
    2011-07-13 20:11:50 [INFO] [BBROTHER] BBData H2 Driver r1 loaded!
    2011-07-13 20:11:50 [INFO] [BBROTHER] Building `bbworlds` table...
    2011-07-13 20:11:50 [INFO] [BBROTHER] Building `bbusers` table...
    2011-07-13 20:11:50 [INFO] [BBROTHER] Permissions plugin found but disabled. Enabling 'Permissions' (v3.1.6).
    2011-07-13 20:11:50 [INFO] [Permissions] (Yeti) disabled successfully.
    2011-07-13 20:11:50 [INFO] [BBROTHER] Permissions enabled using: Permissions v3.1.6
    2011-07-13 20:11:50 [INFO] [BBROTHER] Help plugin detected but disabled. Enabling plugin 'Help' (v0.2.4.1).
    2011-07-13 20:11:50 [INFO] [HELP] 0 extra help entries loaded
    2011-07-13 20:11:50 [INFO] [HELP] Permissions enabled using: Permissions v3.1.6
    2011-07-13 20:11:50 [INFO] [HELP] Help 0.2.4.1 enabled
    2011-07-13 20:11:51 [INFO] [BBROTHER] 'Help' support enabled
    2011-07-13 20:11:51 [INFO] [BBROTHER] BigBrother 1.9-SNAPSHOT (build #569) enabled!
    2011-07-13 20:11:51 [INFO] BlastControl version 1.0.6 is enabled!
    2011-07-13 20:11:51 [INFO] ChairCraft 1.2.4 is enabled.
    2011-07-13 20:11:51 [INFO] [Command iConomy] Loaded.
    2011-07-13 20:11:51 [INFO] CommandHelper 3.1.1 enabled
    2011-07-13 20:11:51 [INFO] CommandHelper: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-07-13 20:11:51 [INFO] [CommandHelper]: 0 alias(es) defined.
    2011-07-13 20:11:51 [INFO] [CommandSigns] 0.9 enabled.
    2011-07-13 20:11:51 [INFO] CommandSigns: Integrated with Permissions v3.1.6
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] ===== ENABLE START
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] Loading conf.txt ...
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] Wand: Watch
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] Block: Diamond block
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] Found and will use plugin Permissions v3.1.6
    2011-07-13 20:11:51 [INFO] [CreativeGates v1.1.1] ===== ENABLE END
    2011-07-13 20:11:51 [INFO] [CustomDifficulty] Found the following difficulties: default, easy, hard, normal.
    2011-07-13 20:11:51 [INFO] [CustomDifficulty] 0 regions loaded!
    2011-07-13 20:11:51 [SEVERE] Error occurred while enabling CustomDifficulty v3.4.2 (Is it up to date?): null
    java.lang.NullPointerException
    at Pasukaru.CustomDifficulty.Hooks.Permissions.hook(Permissions.java:51)
    at Pasukaru.CustomDifficulty.Hooks.Permissions.initialize(Permissions.java:20)
    at Pasukaru.CustomDifficulty.CustomDifficulty.initialize(CustomDifficulty.java:60)
    at Pasukaru.CustomDifficulty.CustomDifficulty.onEnable(CustomDifficulty.java:44)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)


    Random feature idea: When you do a configurable action (right-click while sneaking while holding an iron door or something similar), the plugin checks for a sword in your inventory and swaps it with your shield-door, and when you do the same thing with the sword, it swaps them back.
     
  29. Offline

    marinating

    Not sure if your issue is caused by a conflict. You might want to post this on the CustomDifficulty thread.
    As for new features, they're unlikely because I want this plugin to do exactly what the name implies- use a shield as a door.
     
  30. Offline

    Flenix

    Suggestion:
    If the door is in a slot to the left/right of a weapon, and you sneak, it acts as a shield as normal. That way you can have sword and sheild equiped together :)
     
  31. Offline

    marinating

    Not sure how I would do that. You mean attacking with the door would deal the damage of the weapon?
     

Share This Page