One Hit Cap

Discussion in 'Plugin Requests' started by Dropix, Jun 3, 2018.

Thread Status:
Not open for further replies.
  1. Minecraft version: 1.11.2

    Suggested name: One Hit Cap

    What I want: I need a plugin which prevents getting onehited, if the player have over (for example) 80% of the HP. Here a example to make it clear:

    If I am getting hit by a creeper with 90 damage (for example), I should be alive with 0.5 HP, if I had 80% of my HP before. But if I have 79% or below of my HP and getting hit then, than I should die.

    (I hope you get it, even with my bad english skills)

    Edit: This should not count for falldamage, voiddamage, etc. (indirect damage)

    Ideas for commands: "/setOhCap [Value]" (Value can be 0.8 (80%), just anything between 0 and 1).

    When I'd like it by: asap
     
    Last edited: Jun 3, 2018
  2. Offline

    MightyOne

    It's funny because often creepers only blow me up in the air with half a heart left and then I die of fall damage.
     
  3. So it will be like it then
     
  4. Offline

    MightyOne

    So it will be:
    https://www.dropbox.com/s/43cf0mlo8n2oqcx/OHC.jar?dl=0

    I just stopped any entity from one hitting you, i though that was pretty much waht you described. If there is any other damage source you would like to be included let me know
    (thown potions and arrows are entities as well)
     
    Last edited: Jun 4, 2018
  5. Thank you for the plugin anyways,

    Thats basicly the plugin, yes. I tested this out and it works well with normal mobs, except the creeper, I am still getting one shoted by it. Would it be possible to fix this too?
     
  6. Offline

    MightyOne

    Well.. you know explosions are a bit tricky. Imagine it: Right in the beginning they are just a simple point. But then they expand in all directions equally. You could talk about polar cordinates here, or a three dimensional ellipsoid, plaything of time and space. That's what makes it super complicated to calculate who was or was not hit by an explosion. I mean I know a bit about maths but the mathematical equations needed in this case... would by far top my knowledge.

    welp nvm:
    https://www.dropbox.com/s/43cf0mlo8n2oqcx/OHC.jar?dl=0
     
    Last edited: Jun 5, 2018
    Dropix likes this.
  7. Well, seems not to be working for me. But I can understand it, that this one could be a bit difficult
     
  8. Offline

    MightyOne

    Yes I found a mistake. Link is updated. Try to describe as good as possible what went wrong next time.
     
    Last edited: Jun 6, 2018
    Dropix likes this.
  9. You did not think about using the DamageCause.ENTITY_EXPLOSION in EntityDamageEvent?
     
  10. Offline

    MightyOne

    @FurRail that was a joke, ok? A bit of common sense pls

    Feel free to decompile the jar and look up which event i used
     
  11. Yep, seems to be working now. Thanks to you! :)
     
  12. No joke here.
    Common sense tells me, there are acually people who would do such math!
     
Thread Status:
Not open for further replies.

Share This Page