summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-27 12:57:04 +1000
committermd_5 <git@md-5.net>2018-08-27 12:57:04 +1000
commitf5985747113f69decf936726bd609e55611ab465 (patch)
treea60adc960831e921628cd0fe462f80956b45ec5a
parent479ec05e3b15937ae7e988d9050d167fc6ba307d (diff)
downloadcraftbukkit-f5985747113f69decf936726bd609e55611ab465.tar
craftbukkit-f5985747113f69decf936726bd609e55611ab465.tar.gz
craftbukkit-f5985747113f69decf936726bd609e55611ab465.tar.lz
craftbukkit-f5985747113f69decf936726bd609e55611ab465.tar.xz
craftbukkit-f5985747113f69decf936726bd609e55611ab465.zip
SPIGOT-4313: Unsupported plugin should not crash server
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index fedb660a..848b9c92 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -34,9 +34,8 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.MaterialData;
-import org.bukkit.plugin.PluginAwareness;
+import org.bukkit.plugin.InvalidPluginException;
import org.bukkit.plugin.PluginDescriptionFile;
-import org.bukkit.plugin.UnknownDependencyException;
@SuppressWarnings("deprecation")
public final class CraftMagicNumbers implements UnsafeValues {
@@ -204,10 +203,10 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
@Override
- public void checkSupported(PluginDescriptionFile pdf) {
+ public void checkSupported(PluginDescriptionFile pdf) throws InvalidPluginException {
if (pdf.getAPIVersion() != null) {
if (!pdf.getAPIVersion().equals("1.13")) {
- throw new UnknownDependencyException("Unsupported API version " + pdf.getAPIVersion());
+ throw new InvalidPluginException("Unsupported API version " + pdf.getAPIVersion());
}
}
}