Only try to load the previous gamemode if it isn't null.
This commit is contained in:
@@ -219,6 +219,7 @@ public class JailIO {
|
|||||||
flat.set(cNode + "prisoner.offlinePending", p.isOfflinePending());
|
flat.set(cNode + "prisoner.offlinePending", p.isOfflinePending());
|
||||||
flat.set(cNode + "prisoner.reason", p.getReason());
|
flat.set(cNode + "prisoner.reason", p.getReason());
|
||||||
flat.set(cNode + "prisoner.previousLocation", p.getPreviousLocationString());
|
flat.set(cNode + "prisoner.previousLocation", p.getPreviousLocationString());
|
||||||
|
if(p.getPreviousGameMode() != null)
|
||||||
flat.set(cNode + "prisoner.previousGameMode", p.getPreviousGameMode().toString());
|
flat.set(cNode + "prisoner.previousGameMode", p.getPreviousGameMode().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,6 +231,7 @@ public class JailIO {
|
|||||||
flat.set(pNode + "offlinePending", p.isOfflinePending());
|
flat.set(pNode + "offlinePending", p.isOfflinePending());
|
||||||
flat.set(pNode + "reason", p.getReason());
|
flat.set(pNode + "reason", p.getReason());
|
||||||
flat.set(pNode + "previousLocation", p.getPreviousLocationString());
|
flat.set(pNode + "previousLocation", p.getPreviousLocationString());
|
||||||
|
if(p.getPreviousGameMode() != null)
|
||||||
flat.set(pNode + "previousGameMode", p.getPreviousGameMode().toString());
|
flat.set(pNode + "previousGameMode", p.getPreviousGameMode().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user