mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Heap of bugfixes, cleanup and PHP 7 upgrades
This commit is contained in:
@ -168,7 +168,7 @@ abstract class PluginBase implements Plugin{
|
||||
* @return bool
|
||||
*/
|
||||
protected function isPhar(){
|
||||
return substr($this->file, 0, 7) === "phar://";
|
||||
return strpos($this->file, "phar://") === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +145,7 @@ class PluginManager{
|
||||
* @return Plugin|null
|
||||
*/
|
||||
public function loadPlugin($path, $loaders = null){
|
||||
foreach(($loaders === null ? $this->fileAssociations : $loaders) as $loader){
|
||||
foreach($loaders ?? $this->fileAssociations as $loader){
|
||||
if(preg_match($loader->getPluginFilters(), basename($path)) > 0){
|
||||
$description = $loader->getPluginDescription($path);
|
||||
if($description instanceof PluginDescription){
|
||||
|
Reference in New Issue
Block a user