Catch YAML exceptions as InvalidPluginExceptions

This commit is contained in:
Erik Broes 2011-04-01 09:59:24 +02:00
parent 0d98e831cc
commit 8b7ac0b39e

View File

@ -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);