Search for bungee.yml and then plugin.yml for Bungee plugins.

This commit is contained in:
md_5 2014-02-02 12:22:25 +11:00
parent ddab9a84c4
commit 1f1cdb47e4

View File

@ -308,8 +308,12 @@ public class PluginManager
{ {
try ( JarFile jar = new JarFile( file ) ) try ( JarFile jar = new JarFile( file ) )
{ {
JarEntry pdf = jar.getJarEntry( "plugin.yml" ); JarEntry pdf = jar.getJarEntry( "bungee.yml" );
Preconditions.checkNotNull( pdf, "Plugin must have a plugin.yml" ); if ( pdf == null )
{
pdf = jar.getJarEntry( "plugin.yml" );
}
Preconditions.checkNotNull( pdf, "Plugin must have a plugin.yml or bungee.yml" );
try ( InputStream in = jar.getInputStream( pdf ) ) try ( InputStream in = jar.getInputStream( pdf ) )
{ {