Error EntityDamageByEntityEvent

Status
This thread has been locked.

TheMist

Feedback score
-1
Posts
30
Reactions
1
Resources
0
Pastebin of Error:
Pastebin of Error Lines (156-167):


This happens when I attack an NPC, but when I right click, the menus are opened without problems

Also it is possible to emphasize that only happens with human entities, if I attack a NPC Villager or Zombie, does not leave the error

I have Citizens and CommandNPC plugins in my server.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Tyler

Developer
Supreme
Feedback score
14
Posts
2,589
Reactions
2,238
Resources
0
I'm assuming whatever your SPlayer is, is null. What is the code for line 163 of 'GameEvents'?
 

Keegan

Premium
Feedback score
2
Posts
80
Reactions
73
Resources
0
Check if damager & player are null before you do your last if statement.
 
Last edited:

TheMist

Feedback score
-1
Posts
30
Reactions
1
Resources
0
I'm assuming whatever your SPlayer is, is null. What is the code for line 163 of 'GameEvents'?

Is this:

if (player.getGame() != null && damager.getGame() != null && !player.isDead() && !damager.isDead()) {
 

Tyler

Developer
Supreme
Feedback score
14
Posts
2,589
Reactions
2,238
Resources
0
Is this:

if (player.getGame() != null && damager.getGame() != null && !player.isDead() && !damager.isDead()) {
player or damager is probably returning null, like Keegan and I mentioned, so add in a null check, broadcast a message, idk.
 

TheMist

Feedback score
-1
Posts
30
Reactions
1
Resources
0
Check if damager & player are null before you do your last if statement.
After if (entity instanceof Player && target instanceof Player) {

final Entity entity = event.getEntity();
final Entity target = event.getDamager();[DOUBLEPOST=1497668206][/DOUBLEPOST]
player or damager is probably returning null, like Keegan and I mentioned, so add in a null check, broadcast a message, idk.
What should I do in this case?
 

Tyler

Developer
Supreme
Feedback score
14
Posts
2,589
Reactions
2,238
Resources
0
Can you show your SPlayer class? What is player.getGame() ?
 

TheMist

Feedback score
-1
Posts
30
Reactions
1
Resources
0
This is SPlayer full class :)

 

TheMist

Feedback score
-1
Posts
30
Reactions
1
Resources
0
BUMP
 
Status
This thread has been locked.
Top