public static ResourceBundle getPluginResourceBundle(String pluginName) throws Exception {
        final Locale locale = JiveGlobals.getLocale();

        String i18nFile = getI18nFile(pluginName);

        // Retrieve classloader from pluginName.
        final XMPPServer xmppServer = XMPPServer.getInstance();
        PluginManager pluginManager = xmppServer.getPluginManager();
        Plugin plugin = pluginManager.getPluginByCanonicalName(pluginName)
            .orElseThrow(() -> new NullPointerException("Plugin could not be located: " + pluginName) );
        ClassLoader pluginClassLoader = pluginManager.getPluginClassloader(plugin);
        return ResourceBundle.getBundle(i18nFile, locale, pluginClassLoader);
    }
Retrieve the <code>ResourceBundle</code> that is used with this plugin.

@param pluginName the name of the plugin.
@return the ResourceBundle used with this plugin.
@throws Exception thrown if an exception occurs.
xmppserver/src/main/java/org/jivesoftware/util/LocaleUtils.java