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

@ -38,8 +38,8 @@ shadowJar {
include(dependency('org.bstats:bstats-bukkit:1.4'))
// update notification stuff
include(dependency('com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT'))
include(dependency('com.squareup.retrofit2:retrofit:2.5.0'))
include(dependency('com.squareup.okhttp3:okhttp:3.14.1'))
include(dependency('com.squareup.retrofit2:retrofit:2.4.0'))
include(dependency('com.squareup.okhttp3:okhttp:3.14.0'))
include(dependency('com.squareup.okio:okio:2.2.2'))
include(dependency('org.jetbrains.kotlin:kotlin-stdlib:1.3.30'))
}

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);

View File

@ -13,7 +13,7 @@ dependencies {
testAnnotationProcessor("org.projectlombok:lombok:1.18.4")
compile 'com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT'
compile 'com.squareup.okhttp3:okhttp:3.14.1'
compile 'com.squareup.okhttp3:okhttp:3.14.0'
compile 'com.squareup.okio:okio:2.2.2'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.3.30'
}