From c7ba94f959df8ed4dda275fd2b9a91720b7d0a79 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 23 Apr 2019 23:03:52 +0100 Subject: [PATCH] Fix legacy material loading error and Jenkins4J dependencies --- Bukkit/build.gradle | 4 ++-- .../bukkit/util/BukkitLegacyMappings.java | 12 +++++++++--- Core/build.gradle | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index b849afac8..e7c0e90ce 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -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')) } diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java index 85da1affc..00edbb660 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java @@ -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); diff --git a/Core/build.gradle b/Core/build.gradle index c07965771..d08b102f5 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -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' }