Check all plugins have a name and main.
This commit is contained in:
parent
859d176c93
commit
f53e66e2c0
@ -347,6 +347,9 @@ public class PluginManager
|
|||||||
try ( InputStream in = jar.getInputStream( pdf ) )
|
try ( InputStream in = jar.getInputStream( pdf ) )
|
||||||
{
|
{
|
||||||
PluginDescription desc = yaml.loadAs( in, PluginDescription.class );
|
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 );
|
desc.setFile( file );
|
||||||
toLoad.put( desc.getName(), desc );
|
toLoad.put( desc.getName(), desc );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user