Filled HealthSteal

Discussion in 'Plugin Requests' started by adi0115, Jul 22, 2018.

Thread Status:
Not open for further replies.
  1. Plugin category: PvP

    Minecraft version: 1.8.9

    Suggested name: HealthSteal

    What I want: When a player has a sword with a specific name (that is set in the config), will regen half a heart for every hit on a player, if the player has full health, the health from hits will go to a second health bar, the maximum is 20 hearts, 10 vanilla hearts and 10 bonus hearts.

    Ideas for commands:
    /hs reload - reloads the config

    Ideas for permissions:
    hs.admin - permission to reload the plugin

    When I'd like it by: Today
     
  2. Offline

    KarimAKL

    @adi0115 I might've been able to make this but i can't at the moment and you want it by today so i'm sorry, maybe someone else will make this for you.
     
  3. Offline

    sebcio98

    So.. you want the life leech ability to be based only on the name of the item in player's hand? Then players can make anything into a life leech weapon by changing its name in the Anvil. I'm assuming you don't want that to happen?
    Also, does it work only when attacking a player or any entity?
     
    Last edited: Jul 22, 2018
  4. Anvils are not used on my server, and it will only work against players, nothing will happen against entities.
     
  5. Offline

    Slash9211

    So if I understand correctly then I believe I've finished the plugin. You're wanting a plugin that when a player hits another player with a sword it heals the damager half a heart? You also want the plugin to have a config file where you can change the name of the sword that triggers the event?

    If all looks good above here's the download link, https://www.dropbox.com/s/r7uap8ibzcqeg4x/HealthSteal.jar?dl=0

    Here's a link to the code as well, https://gist.github.com/1129hsalS/c2554de4bf8067843d93d86d6f01416b
     
    Last edited: Jul 23, 2018
  6. Offline

    sebcio98

    @adi0115 Here's the plugin. Everything is customizable including NBT support, in case you'll decide one day that item name isn't enough to give life leech or um.. "health steal" to an item.
    Download: https://ufile.io/8aa1q (valid for 30 days)
    Code: https://gist.github.com/RandomPersson/e5597a894a1149022f914293aeb02497

    Commands:
    /leech or /sll
    /sll reload - reloads config
    /sll apply - apply the life leech to item in hand

    Permissions:
    sll.admin

    Config (default values are set to what you wanted):
    leechName: 'LifeLeecher' - name of the item
    additionalHealth: 20 - amount of bonus health
    lifeLeechAmount: 1 - amount of life healed per hit
    useTags: false - use NBT tags along item name
    onlyPlayers: true - effect works only when hitting another player

    EDIT: Oof, seems I wasn't the first. Should have refreshed the site before posting. Welp, it's not about who did it first, but who did it better :p
    @Slash9211 I don't think your plugin meets the criteria, as I believe the natural regen shouldn't replenish the additional hearts, which, in your case, it does.

    EDIT2: Derp. Fixed a small issue, updated both links.
     
    Last edited: Jul 23, 2018
  7. @sebcio98 Thanks a lot, could you also add a command where you can setup multiple cuboids where the health doesn't get added? I noticed it still adds in non-pvp places.
     
    Last edited: Jul 23, 2018
  8. Offline

    sebcio98

    @adi0115 Sure!
    I am assuming you're using WorldGuard for regions, well, if not then please so. It's a very good plugin.

    I had to do it in a quite sneaky way to save time and processing power. Every region that contains "pvp" in any part of its name will be considered a PVP region. Players not in any PVP regions will not have life leech effect and when leaving one the additional hearts will reset back to 0.

    You need WorldEdit, WorldGuard and WGRegionEvents plugins.
    Links to all plugins (if something doesn't work, download and replace WorldEdit/WorldGuard from these links, maybe I was using different versions):
    SimpleLifeLeech: https://ufile.io/wvfp3
    WorldEdit: https://ufile.io/xp9f6
    WorldGuard: https://ufile.io/0blrs
    WGRegionEvents: https://ufile.io/bzp7z
    Code: https://gist.github.com/RandomPersson/e5597a894a1149022f914293aeb02497

    Also, make sure your PVP arena (or wherever you have PVP in) consists of only 1 WorldGuard region with "pvp" in name, or else people's additional hearts will reset when they leave a set-up region even though they're still within the prepared PVP area.
     
  9. @sebcio98 Thank you very much for continuing to support this unfortunely in my case atleast, I only use worldGuard for spawn as I have a dedicated plugin that prevents players breaking blocks because theres no building on my server so it's easier for me to just use a plugin to prevent breaking blocks alltogether rather than use WolrdGuard to protected areas of my server from building, I hope this still makes sense. Would you be able to switch it around so if someone is in a region that ends with Spawn, the effect will not work but if they're in any another region/out of spawn region, the effect will work? I'm sure the PvP region method will be usefull for someone who uses WorldGuard to protected their whole arena/world.
     
  10. Offline

    sebcio98

    I have no problem with adding small changes if they take like 20 minutes ^^
    I added some more pretty self-explanatory config values and, as always, default values are what you wanted. So now life leech will work everywhere except for spawn.
    To be more exact any regions that contain "spawn" in their name remove the additional hearts and disable the life leech, while "pvp" regions are disabled by default.

    Download: https://ufile.io/wfvey

    EDIT: Oh, and I added some potentially annoying warnings showing on each login when config couldn't be loaded or was reset due to being an older version. When doing /sll reload they will refresh and stop appearing if everything works.
     
    Last edited: Jul 26, 2018
  11. @sebcio98 It appears there's an issue with the latest version, I dropped it into my plugins folder and restarted the server and it was not working, so I assumed the config changed so I deleted the folder and restarted the server and the server does not re-create the folder with the config.
     
  12. Offline

    sebcio98

    @adi0115 Well, if you just say "there's an issue", I cannot really do anything, since I still don't know anything. You have to give me at least the error message or if it doesn't start up at all then I need the server version (/ver command) and the list of plugins you use.
    Right now all I can say is make sure you have the 3 required plugins I mentioned earlier (WorldEdit, WorldGuard, WGRegionEvents) and a proper server version (I'm using <Edit by Moderator: Redacted DMCA breaking url> 1.8.8-R0.1 aka 1.8_R0.3[/URL]).
    I have downloaded a fresh server alongside the plugins from links I posted here and everything works. All the links are in this message too. Including my plugin.

    EDIT: I'll be away from home for the next week, so I hope the problem is on your side and you're able to fix it.
     
    Last edited by a moderator: Jul 29, 2018
Thread Status:
Not open for further replies.

Share This Page