Cancel Falldamage

i am trying to cancel the FallDamage for specific players. How can I do this? I know there is event.getCause() And I looked up in the docs but it confuses me. How do I check if the Damage is from Fall/Fire etc.?

I already wrote a really simple plugin that does something for this, but without permissions (I guess I could add permission checks as well):

Edit: I’ve added in a permission check :wink:

1 Like

Okay, thank you very much! The only thing is, that I don’t completely understand what the @Root means? Is it like @First but it’s where the damage originally comes from?

@Root is a filter on the event where the first object in the Cause must be a DamageSource, if the event has a different root object, it would be ignored.

1 Like