Check all plugins have a name and main.

This commit is contained in:
md_5 2016-03-12 12:00:56 +11:00
parent 859d176c93
commit f53e66e2c0

View File

@ -347,6 +347,9 @@ public class PluginManager
try ( InputStream in = jar.getInputStream( pdf ) )
{
PluginDescription desc = yaml.loadAs( in, PluginDescription.class );
Preconditions.checkNotNull( desc.getName(), "Plugin from %s has no name", file );
Preconditions.checkNotNull( desc.getMain(), "Plugin from %s has no main", file );
desc.setFile( file );
toLoad.put( desc.getName(), desc );
}