Catch YAML exceptions as InvalidPluginExceptions
This commit is contained in:
parent
0d98e831cc
commit
8b7ac0b39e
@ -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…
x
Reference in New Issue
Block a user