mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Catch YAML exceptions as InvalidPluginExceptions
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
@@ -24,6 +24,7 @@ import org.bukkit.event.server.*;
|
|||||||
import org.bukkit.event.vehicle.*;
|
import org.bukkit.event.vehicle.*;
|
||||||
import org.bukkit.event.world.*;
|
import org.bukkit.event.world.*;
|
||||||
import org.bukkit.plugin.*;
|
import org.bukkit.plugin.*;
|
||||||
|
import org.yaml.snakeyaml.error.YAMLException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a Java plugin loader, allowing plugins in the form of .jar
|
* Represents a Java plugin loader, allowing plugins in the form of .jar
|
||||||
@@ -62,6 +63,8 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||||||
jar.close();
|
jar.close();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new InvalidPluginException(ex);
|
throw new InvalidPluginException(ex);
|
||||||
|
} catch (YAMLException ex) {
|
||||||
|
throw new InvalidPluginException(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
File dataFolder = getDataFolder(file);
|
File dataFolder = getDataFolder(file);
|
||||||
|
Reference in New Issue
Block a user