Closed RealGatt closed 2 years ago
As it turns out, it was just an error on my end. I took a look back at your code and noticed that you were already registering the events- which I had not realised that you changed since the prior version. Apologies :)
Line 134 of the DamageListener.java class will consistently cancel the DamageEvent.
During testing, I compiled a custom Minestom version that changes the
setCancelled
function of the EntityDamageEvent to the above code- effectively printing out whenever the value was changed, and by what.In my own code, I listened to the EntityDamageEvent with a priority of -1 to run this;
This gives the following output; (using a Diamond Sword against another player)
PvP code is started as so, and MinestomPvP is used as an extension, compiled from Jitpack's Maven Repo. Happy to attach anything else that is needed/debug further.
Feel free to DM on Discord-
Gatt#0010