Fix IIOB error when dealing with an incomplete YAML && Nagging

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot 2011-04-01 10:24:48 +02:00
parent 412fb96061
commit 9d24880b0e

View file

@ -257,9 +257,14 @@ public final class SimplePluginManager implements PluginManager {
Plugin plugin = registration.getPlugin();
if (plugin.isNaggable()) {
plugin.setNaggable(false);
String author = "<NoAuthorGiven>";
if (plugin.getDescription().getAuthors().size() > 0) {
author = plugin.getDescription().getAuthors().get(0);
}
server.getLogger().log(Level.SEVERE, String.format(
"Nag author: '%s' of '%s' about the following: %s",
plugin.getDescription().getAuthors().get(0),
author,
plugin.getDescription().getName(),
ex.getMessage()
));