mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
PharPluginLoader: remove useless instanceof, offset is always PharFileInfo at this point
This commit is contained in:
parent
0e35ee8cb7
commit
dba14c9f08
@ -57,10 +57,7 @@ class PharPluginLoader implements PluginLoader{
|
|||||||
public function getPluginDescription(string $file) : ?PluginDescription{
|
public function getPluginDescription(string $file) : ?PluginDescription{
|
||||||
$phar = new \Phar($file);
|
$phar = new \Phar($file);
|
||||||
if(isset($phar["plugin.yml"])){
|
if(isset($phar["plugin.yml"])){
|
||||||
$pluginYml = $phar["plugin.yml"];
|
return new PluginDescription($phar["plugin.yml"]->getContent());
|
||||||
if($pluginYml instanceof \PharFileInfo){
|
|
||||||
return new PluginDescription($pluginYml->getContent());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user