Skip to content

Commit

Permalink
Fixed errors when incorrectly configuring island preview locations
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Jan 27, 2023
1 parent cba21ee commit 43bdeb6
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -508,9 +508,14 @@ else if (sections.length == 3)
.map(KeyImpl::of).collect(Collectors.toSet()));
islandPreviewLocations = new HashMap<>();
if (config.isConfigurationSection("preview-islands")) {
for (String schematic : config.getConfigurationSection("preview-islands").getKeys(false))
islandPreviewLocations.put(schematic.toLowerCase(Locale.ENGLISH), Serializers.LOCATION_SERIALIZER
.deserialize(config.getString("preview-islands." + schematic)));
for (String schematic : config.getConfigurationSection("preview-islands").getKeys(false)) {
try {
islandPreviewLocations.put(schematic.toLowerCase(Locale.ENGLISH), Serializers.LOCATION_SERIALIZER
.deserialize(config.getString("preview-islands." + schematic)));
} catch (Exception error) {
Log.warn("Cannot deserialize island preview for ", schematic, ", skipping...");
}
}
}
tabCompleteHideVanished = config.getBoolean("tab-complete-hide-vanished", true);
dropsUpgradePlayersMultiply = config.getBoolean("drops-upgrade-players-multiply", false);
Expand Down

0 comments on commit 43bdeb6

Please sign in to comment.