diff --git a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java index dfa8748..c6875fa 100644 --- a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java @@ -256,7 +256,7 @@ public class DatabaseDataStore extends DataStore } catch(Exception e) { - if(e.getMessage().contains("World not found")) + if(e.getMessage() != null && e.getMessage().contains("World not found")) { GriefPrevention.AddLogEntry("Failed to load a claim (ID:" + claimID.toString() + ") because its world isn't loaded (yet?). Please delete the claim or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString); continue; diff --git a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java index 67348a0..df7aecd 100644 --- a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java @@ -359,7 +359,7 @@ public class FlatFileDataStore extends DataStore //if there's any problem with the file's content, log an error message and skip it catch(Exception e) { - if(e.getMessage().contains("World not found")) + if(e.getMessage() != null && e.getMessage().contains("World not found")) { GriefPrevention.AddLogEntry("Failed to load a claim " + files[i].getName() + " because its world isn't loaded (yet?). Please delete the claim file or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString); inStream.close();