Compatibility fix for mods that initialize player or worldobj fields as null.

This commit is contained in:
luisc committed 2022-01-15 22:52:27 -06:00
1 parent f8a6fe3d75
commit dd22f604cc
1 file changed
+1 -1
@@ -53,7 +53,7 @@ public class ScriptForgeEventHandler {
} else if(!(event instanceof TickEvent) || ((TickEvent)event).side != Side.CLIENT) {
if (event instanceof PlayerEvent) {
PlayerEvent ev = (PlayerEvent) event;
if (!(ev.player.worldObj instanceof WorldServer)) {
if (ev.player == null || !(ev.player.worldObj instanceof WorldServer)) {
return;
}
}