Merge commit 'd94995e161d71659e2fe6ec1df47621f2de4b494'

# Conflicts:
#	resources/vanilla
This commit is contained in:
Dylan K. Taylor 2020-01-31 19:46:28 +00:00
commit 19a6fb35e7
2 changed files with 22 additions and 1 deletions

View File

@ -77,13 +77,14 @@ class PluginDescription{
private $permissions = [];
/**
* @param string|array $yamlString
* @param string|mixed[] $yamlString
*/
public function __construct($yamlString){
$this->loadMap(!is_array($yamlString) ? yaml_parse($yamlString) : $yamlString);
}
/**
* @param mixed[] $plugin
* @throws PluginException
*/
private function loadMap(array $plugin) : void{
@ -161,6 +162,9 @@ class PluginDescription{
return $this->name . " v" . $this->version;
}
/**
* @return string[]
*/
public function getCompatibleApis() : array{
return $this->api;
}
@ -183,6 +187,9 @@ class PluginDescription{
return $this->prefix;
}
/**
* @return mixed[][]
*/
public function getCommands() : array{
return $this->commands;
}
@ -228,6 +235,9 @@ class PluginDescription{
}
}
/**
* @return string[]
*/
public function getDepend() : array{
return $this->depend;
}
@ -236,6 +246,9 @@ class PluginDescription{
return $this->description;
}
/**
* @return string[]
*/
public function getLoadBefore() : array{
return $this->loadBefore;
}
@ -259,6 +272,9 @@ class PluginDescription{
return $this->permissions;
}
/**
* @return string[]
*/
public function getSoftDepend() : array{
return $this->softDepend;
}
@ -271,6 +287,9 @@ class PluginDescription{
return $this->website;
}
/**
* @return mixed[]
*/
public function getMap() : array{
return $this->map;
}

View File

@ -175,6 +175,8 @@ class PluginManager{
}
/**
* @param string[]|null $newLoaders
*
* @return Plugin[]
*/
public function loadPlugins(string $directory, ?array $newLoaders = null) : array{