From b24cd48984ed02b01bf111e17ac76339b8dc8bfe Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 31 Oct 2015 21:42:16 +0100 Subject: [PATCH] Prevented Crash when the manual was open during a world crash or kick --- .../util/playerdata/PersistentClientData.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java index e8998beb8..108df2714 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java +++ b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java @@ -54,7 +54,10 @@ public class PersistentClientData{ } private static String getName(){ - return Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP; + if(Minecraft.getMinecraft().theWorld != null){ + return Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP; + } + return "Invalid"; } private static NBTTagCompound getCompoundForWorld(NBTTagCompound mainCompound){