Fixed phar plugins not reading resources correctly

This commit is contained in:
Dylan K. Taylor
2018-06-13 12:07:27 +01:00
parent 78eae28a3e
commit c835c97aba
5 changed files with 20 additions and 4 deletions

View File

@ -158,7 +158,8 @@ class PluginManager{
return null;
}
$loader->loadPlugin($path);
$prefixed = $loader->getAccessProtocol() . $path;
$loader->loadPlugin($prefixed);
$mainClass = $description->getMain();
if(!class_exists($mainClass, true)){
@ -175,7 +176,7 @@ class PluginManager{
* @var Plugin $plugin
* @see Plugin::__construct()
*/
$plugin = new $mainClass($loader, $this->server, $description, $dataFolder, $path);
$plugin = new $mainClass($loader, $this->server, $description, $dataFolder, $prefixed);
$plugin->onLoad();
$this->plugins[$plugin->getDescription()->getName()] = $plugin;