alkarinv / BattleTracker

A SQLbased tracker for minecraft. allows overall stats, tallies, and individual records.
2 stars 14 forks source link

Could Not Pass EntityDeathEvent. #37

Open matthiasiam opened 10 years ago

matthiasiam commented 10 years ago

This error plagues my console. Not sure how to handle it. Thanks! Spigot 1.7.5

http://pastebin.com/4YfDhydS

alkarinv commented 10 years ago

Not even sure how this is possible... basically it's saying that both the killer and target is a player... but that it's not a PlayerDeathEvent...

Do you know what plugin is doing that? But a workaround is very simple.. I'll try and do it right now.

matthiasiam commented 10 years ago

You mean besides BattleTracker? There is a separate plugin creating this event?

alkarinv commented 10 years ago

Well.. I just looked in the code. This error is coming from this . "ClassCastException: EntityDeathEvent cannot be cast to PlayerDeathEvent"

So it's a generic Entity.. not a Player. That is what the error says.

In my code... I have this right before the line that causes the error

if (event instanceof PlayerDeathEvent){
   PlayerDeathEvent pde = (PlayerDeathEvent) event; /// line that is causing error
}

Basically I check to make sure its a Player before casting. So all I can think of is some sort of conflict... or perhaps is a problem with using the /reload, on the server.

I would suggest restarting... guessing the problem will go away.

matthiasiam commented 10 years ago

Okay, I'll wait for the scheduled restart and keep track of this error if it occurs again after the restart. Thanks!