src/Core/Plugin.php
public static function loaded($plugin = null)
    {
        if ($plugin !== null) {
            return isset(static::$plugins[$plugin]);
        }
        $return = array_keys(static::$plugins);
        sort($return);

        return $return;
    }
public static function loaded($plugin = null)
    {
        if ($plugin !== null) {
            return isset(static::$plugins[$plugin]);
        }
        $return = array_keys(static::$plugins);
        sort($return);

        return $return;
    }
Returns true if the plugin $plugin is already loaded
If plugin is null, it will return a list of all loaded plugins

@param string|null $plugin Plugin name.

@return bool|array Boolean true if $plugin is already loaded.
If $plugin is null, returns a list of plugins that have been loaded.