public boolean reloadPlugin( String pluginName )
    {
        Log.debug( "Reloading plugin '{}'...", pluginName );

        final Plugin plugin = pluginsLoaded.get( pluginName.toLowerCase() );
        if ( plugin == null )
        {
            Log.warn( "Unable to reload plugin '{}'. No such plugin loaded.", pluginName );
            return false;
        }

        final Path path = getPluginPath( plugin );
        if ( path == null )
        {
            // When there's a plugin, there should be a path. If there isn't, our code is buggy.
            throw new IllegalStateException( "Unable to determine installation path of plugin: " + pluginName );
        }

        try
        {
            Files.setLastModifiedTime( path, FileTime.fromMillis( 0 ) );
        }
        catch ( IOException e )
        {
            Log.warn( "Unable to reload plugin '{}'. Unable to reset the 'last modified time' of the plugin path. Try removing and restoring the plugin jar file manually.", pluginName );
            return false;
        }

        pluginMonitor.runNow( false );
        return true;
    }
Delete a plugin, which removes the plugin.jar/war file after which the plugin is unloaded.
@param pluginName the plugin to delete
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java