Fix legacy material loading error and Jenkins4J dependencies

This commit is contained in:
dordsor21
2019-04-23 23:03:52 +01:00
parent 5ac00c4920
commit c7ba94f959
3 changed files with 12 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import com.github.intellectualsites.plotsquared.plot.object.StringPlotBlock;
import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings;
import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
import lombok.*;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import java.util.*;
@ -675,9 +676,14 @@ public final class BukkitLegacyMappings extends LegacyMappings {
for (final Material material : Material.values()) {
final String materialName = material.name().toLowerCase(Locale.ENGLISH);
if (NEW_STRING_TO_LEGACY_PLOT_BLOCK.get(materialName) == null) {
final LegacyBlock missingBlock =
new LegacyBlock(material.getId(), materialName, materialName);
missing.add(missingBlock);
try {
final LegacyBlock missingBlock =
new LegacyBlock(material.getId(), materialName, materialName);
missing.add(missingBlock);
} catch (Exception e) {
Bukkit.getLogger().severe(
"Error creating legacy block: " + materialName + ". Possibly a new block.");
}
}
}
addAll(missing);