Prevent exceptions if a schematicProfile does not exist

This commit is contained in:
Thijs Wiefferink 2016-12-04 17:31:22 +01:00
parent 271b17b6be
commit 87b2cb9ecd
1 changed files with 4 additions and 0 deletions

View File

@ -1737,6 +1737,10 @@ public abstract class GeneralRegion implements GeneralRegionInterface, Comparabl
}
// Get the safe and restore names
ConfigurationSection profileSection = getConfigurationSectionSetting("general.schematicProfile", "schematicProfiles");
if(profileSection == null) {
return;
}
String save = profileSection.getString(type.getValue()+".save");
String restore = profileSection.getString(type.getValue()+".restore");
// Save the region if needed