Fixed null pointer exception crash when right clicking on servers.

This commit is contained in:
luisc committed 2024-03-04 17:56:20 -06:00
1 parent b302f3fecb
commit edf08746cb
1 file changed
+1 -1
@@ -121,7 +121,7 @@ public class ScriptItemEventHandler {
if(event.entityPlayer == null || event.entityPlayer.worldObj == null || event.action == null)
return;
if(event.entityPlayer.worldObj.isRemote && event.entityPlayer.worldObj instanceof WorldServer)
if(event.entityPlayer.worldObj.isRemote || !(event.entityPlayer.worldObj instanceof WorldServer))
return;
if (PlayerDataController.Instance != null) {