Closed orkun1675 closed 9 years ago
I forgot to add return; in the two positions after the setCancelled("true") line. GitHub takes time to get used to I guess..
Will this work?
Make sure to cast Utils.getRootDamager to a player,the isAuthenticated() method is only available on combatplayers so you need to use PluginCompatibility, Instead if
!Utils.getRootDamager(event.getDamager()).isAuthenticated())
you should do
PluginCompatibility.isAuthenticated((Player)Utils.getRootDamager(event.getDamager()))
.
You must add import statements:
I hope this will work?
I'll take it from here.
Tested this and it is even worse. I just figured out that the actual damage problem was caused by authme. So, CombatTag does not need to hook into AuthMe API. AuthMe should be cancelling damage if not authenciated. (https://github.com/Xephi/AuthMeReloaded/pull/18)
Can you remove code related to AuthMe please?
@orkun1675 Upgrade to the latest dev build.
We should cancel the damage no matter what if either of the players are not authenticated by AuthMe. An un-logged-in player cannot do damage or receive it, and should never tag or get tagged.
I should have moved the attacker variable up, and should have checked if AuthMe is available. But I didn't want to interfere with your coding style. Just trying to help a bit.