public static int getDatabaseVersion( Plugin plugin )
    {
        return getDatabaseVersion( XMPPServer.getInstance().getPluginManager().getPluginPath( plugin ) );
    }
Returns the database schema version of a plugin, if it exists. The value is retrieved from the plugin.xml file of
the plugin. If the value could not be found, {@code -1} will be returned.

Note that this method will return data only for plugins that have successfully been installed. To obtain data
from plugin (directories) that have not (yet) been  installed, refer to the overloaded method that takes a Path
argument.

@param plugin The plugin (cannot be null)
@return the plugin's database schema version or {@code -1} if it doesn't exist.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginMetadataHelper.java