Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Yoreni, May 18, 2017.
hi is there a way where i can enable fall damager when player.setAllowFlight is set to true
EntityDamageEvent and find the damage cause and set damage to what ever.
That does not work cos you cant take fall damage when your flying
They were saying to give the damage "manually".
Yes iam just want to know how to do it (I hope i dont come acrose rude to you iam sorry if i do)
On EntityDamageEvent, check if its a player, check if its cancelled, Check if player has AllowFlight, uncancel the event (event#setCancelled(false)). I believe that will do the work. (Also, dont forget to check the cause first before uncancelling it ^^)
The EntityDamageEvent donst work when you fall while flying
what is the purpose you are creating a damage while player is in flight mode? so we can work on with our creativity
I swear this is gone over all the time, and it's hard for the OP to get by people with the fact EntityDamageEvent doesn't fire. You can detect when the player lands, and do your damage. Alternatively you could use my PlayerAirEvents and use the PlayerLandedEvent.