Casting Fix

This commit is contained in:
Kam committed 2024-04-04 17:30:55 -04:00
1 parent a43a4409a3
commit 777283e5aa
1 file changed
+1 -1
@@ -410,7 +410,7 @@ public class ScriptPlayerEventHandler {
} catch (Exception ignored) {}
}
if(source instanceof EntityPlayer) {
if(event.source.getEntity() instanceof EntityPlayer) {
IPlayer scriptPlayer = (IPlayer) NpcAPI.Instance().getIEntity(event.source.getEntity());
EventHooks.onPlayerKills(handler,scriptPlayer, event.entityLiving);
}