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