mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
populate missing array value types in plugin namespace
This commit is contained in:
parent
58bc08838b
commit
d94995e161
@ -79,13 +79,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;
|
||||
}
|
||||
@ -229,6 +236,9 @@ class PluginDescription{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDepend() : array{
|
||||
return $this->depend;
|
||||
}
|
||||
@ -237,6 +247,9 @@ class PluginDescription{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getLoadBefore() : array{
|
||||
return $this->loadBefore;
|
||||
}
|
||||
@ -260,6 +273,9 @@ class PluginDescription{
|
||||
return $this->permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getSoftDepend() : array{
|
||||
return $this->softDepend;
|
||||
}
|
||||
@ -272,6 +288,9 @@ class PluginDescription{
|
||||
return $this->website;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getMap() : array{
|
||||
return $this->map;
|
||||
}
|
||||
|
@ -196,6 +196,8 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[]|null $newLoaders
|
||||
*
|
||||
* @return Plugin[]
|
||||
*/
|
||||
public function loadPlugins(string $directory, array $newLoaders = null){
|
||||
|
Loading…
x
Reference in New Issue
Block a user