mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
PluginDescription: clean up type information for extensions field
This commit is contained in:
parent
e6a58e2690
commit
cda3e6f4dc
@ -48,6 +48,7 @@ class PluginDescription{
|
||||
private $api;
|
||||
/** @var int[] */
|
||||
private $compatibleMcpeProtocols = [];
|
||||
/** @var string[][] */
|
||||
private $extensions = [];
|
||||
private $depend = [];
|
||||
private $softDepend = [];
|
||||
@ -194,7 +195,7 @@ class PluginDescription{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return string[][]
|
||||
*/
|
||||
public function getRequiredExtensions() : array{
|
||||
return $this->extensions;
|
||||
@ -211,9 +212,6 @@ class PluginDescription{
|
||||
throw new PluginException("Required extension $name not loaded");
|
||||
}
|
||||
|
||||
if(!is_array($versionConstrs)){
|
||||
$versionConstrs = [$versionConstrs];
|
||||
}
|
||||
$gotVersion = phpversion($name);
|
||||
foreach($versionConstrs as $constr){ // versionConstrs_loop
|
||||
if($constr === "*"){
|
||||
|
Loading…
x
Reference in New Issue
Block a user