Closed lamya3 closed 6 hours ago
looking into it
I have tested out the procedure you have given me on paper 1.21.3 build no. 79, and have come to the following conclusion.
The plugin pvp-toggle
uses EntityDamageByEntityEvent#getDamageSource().getCausingEntity()
to check for proxy attacks. Stuff like potions, projectiles and explosives. This is currently the only way of checking on who caused the proxy attack without doing some realy suspect stuff.
In conclusion, LeavesMC doesnt seem implement api method EntityDamageByEntityEvent#getDamageSource()
.
See:
java.lang.NoSuchMethodError: 'org.bukkit.damage.DamageSource org.bukkit.event.entity.EntityDamageByEntityEvent.getDamageSource()'
at com.lukeonuke.pvptoggle.event.OnDamageListener.onHit(OnDamageListener.java:82) ~[pvp-toggle-1.4.2.jar:?]
What can you do about it? Either use the old plugin version that didn't check for who caused proxy damage and was unreliable at actually stopping proxy damage, or compile the new plugin with the proxy damage check parts removed.
Debating on closing the issue since that functionality is a core part of pvp-toggle, and leavesmc isn't strictly listed as supported anyways.
Okay got it. thanks for your reminded and I will try it as I can
You can report it to the creators of LeavesMC. Hopefully they will implement the api.
env:
LeavesMC 1.20.1 build #102 openjdk version "21.0.4" 2024-07-16 LTS OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing) PVPToggle v1.4.2 (#7 ?)
console output
How to caused:
console ERROR when player hit by mobs, but did't happen before use command /pvp first time (no recover even
limited-time
finished or PVP status be changed)bruh sorry for my poor English, but I hope these will be useful for dev