OldCombatMechanics

OldCombatMechanics

46.1k Downloads

Option to allow knockback with 0 damage.

mibby opened this issue ยท 3 comments

commented

Is it possible to add an option to allow knockback with 0 damage? When I set the damage value to 0, all knockback stops working. Or is damage necessary for knockback to function?

old-fishing-knockback:
  # This is to make the knockback of players when they get hit by a fishing bobber the same as it was in pre-1.9
  # Credit to HyKurtis for the original code, optimised by Rayzr522
  enabled: true
  worlds: []
  # This makes OCM check if other plugins are stopping the rod damage and follow their choice
  # Set to false to always have rod damage
  checkCancelled: true
  # This is the damage done by the fishing rod attack
  damage: 0
  # Whether the EntityDamageEvent should be used instead of the EntityDamageByEntityEvent
  # Set to true when using plugins like NCP that check range
  useEntityDamageEvent: true
  # This is to cancel dragging in the entity attached to the fishing rod when reeling in, like in 1.8
  cancelDraggingIn: false
  # This is the delay in milliseconds in-between rod damage, so the player hit has time to fall back down
  hitCooldown: 1000
  
projectile-knockback:
  # This adds knockback and/or damage to players when they get hit by snowballs, eggs & enderpearls
  # This has been a Bukkit bug for so long people thought it was vanilla when it was recently patched
  enabled: true
  worlds: []
  # This is the damage done by each projectile
  damage:
    snowball: 0
    egg: 0
    ender_pearl: 0
commented

But if you set the damage to a value < 1, shouldn't that not actually damage but still give the knockback?

commented

Unfortunately not. Players are still damaged with a value of 0.01 when checking their health value with Essential's /whois.

commented

I have lowered the damage to 0.0001 with commit c6d0b67. Hopefully this will be low enough, you can probably lower it further. Because of the way this module works, unfortunately you cannot set it to 0. I don't believe it shouldn't be much of an issue, however.