Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityDamageEvent event.setDamage() (Ignore attack cooldown / Race Condition) #1930

Open
3 tasks done
Instinct1V opened this issue Dec 16, 2021 · 0 comments
Open
3 tasks done

Comments

@Instinct1V
Copy link

Expected Behavior

when you do a event.setDamage() it should change the DamageModifier.BASE to what you set it to.

Actual Behavior

when you do a event.setDamage() in a EntityDamageEvent it will do what seems to be ignoring all attack cooldown data / could be a race condition.

Example: If you do this and jump in lava, run into a cactus, or try to pvp a player... You will see it will do damage rapidly, ignoring the attack cooldown.

Steps to Reproduce

  1. Create a EntityDamageEvent listener...
  2. do a event.setDamage() anywhere in the event, and to any damage.
  3. Find a lavapool, cactus, or player to pvp. and you will see the damage tick away rapidly. damage going per tick...

Debug information

  • Debug link:
  • Timings link (if relevant):

Crashdump, Backtrace or Other Files

Checklist:

  • [Doesnt Throw error...] I included a /debugpaste link
  • I made sure there aren't duplicates of this report (Use Search)
  • I made sure I am using an up-to-date version of Nukkit
  • I Made sure the bug/error is not caused by a plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants