#HELP ME
1 messages · Page 1 of 1 (latest)
Why is my dummy taking dmg when I hit it?
@EventHandler
public void onPvP(EntityDamageByEntityEvent event) {
event.setCancelled(true);
its registered
It's my test server + I later in the method I cancel dmg in a cuboid and that works
send the full class on
There is no need, I cancel it at the very top of the event as shown here
it should cancel it all
what are you actually trying to do here, are you just wanting to cancel any damage done to players?
Well in this case I just call the event and cancel it straight away and that doesn't work, no if or anything
and it doesnt work
when it should
later I have an if and it works there
if (this.plugin.getSpawnController().getCuboid().isIn((victim)) && this.plugin.getSpawnController().getCuboid().isIn((attacker)) ||
!this.plugin.getSpawnController().getCuboid().isIn((victim)) && this.plugin.getSpawnController().getCuboid().isIn((attacker)) ||
this.plugin.getSpawnController().getCuboid().isIn((victim)) && !this.plugin.getSpawnController().getCuboid().isIn((attacker))) {
event.setCancelled(true);
}
is it meant to only apply to players or npcs too
well my dummy is an npc
and the code I sent here cancels for npcs
no errors btw
havent done anything with npcs/nms yet so the best i can advise is to check javadocs and see what they say
hi?
Send the entire code
.
Does the event fire
Any other plugins installed?
ye
Remove them
ok
u can see my debug msg in chat here
Hi
hi
I couldnt find it
I've removed all the biggest suspects, the others are ones I always have for ease / utils
Delete them
aight going in with nothing but this 1m
oh wtf
worke3d
amazing
cant wait to test them 1 by 1
found it
it was vault
??????
wtf
🤔