mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
# Conflicts: # resources/vanilla # src/Server.php # src/lang/Language.php # src/network/mcpe/protocol/AddItemActorPacket.php # src/network/mcpe/protocol/AddPlayerPacket.php # src/network/mcpe/protocol/SetActorDataPacket.php # src/network/mcpe/serializer/NetworkBinaryStream.php # src/permission/Permission.php # src/pocketmine/block/Leaves.php # src/pocketmine/entity/DataPropertyManager.php # src/pocketmine/entity/Entity.php # src/pocketmine/item/Banner.php # src/pocketmine/item/Item.php # src/pocketmine/level/format/io/LevelProvider.php # src/pocketmine/level/format/io/LevelProviderManager.php # src/pocketmine/network/mcpe/protocol/AddActorPacket.php # src/pocketmine/network/mcpe/protocol/LoginPacket.php # src/pocketmine/tile/Banner.php # src/scheduler/BulkCurlTask.php # src/updater/AutoUpdater.php # src/utils/Config.php # src/utils/Utils.php # src/world/generator/Flat.php # src/world/generator/Generator.php
This commit is contained in:
@@ -39,7 +39,10 @@ use function version_compare;
|
||||
use function yaml_parse;
|
||||
|
||||
class PluginDescription{
|
||||
/** @var mixed[] */
|
||||
/**
|
||||
* @var mixed[]
|
||||
* @phpstan-var array<string, mixed>
|
||||
*/
|
||||
private $map;
|
||||
|
||||
/** @var string */
|
||||
@@ -50,7 +53,10 @@ class PluginDescription{
|
||||
private $api;
|
||||
/** @var int[] */
|
||||
private $compatibleMcpeProtocols = [];
|
||||
/** @var string[][] */
|
||||
/**
|
||||
* @var string[][]
|
||||
* @phpstan-var array<string, list<mixed>>
|
||||
*/
|
||||
private $extensions = [];
|
||||
/** @var string[] */
|
||||
private $depend = [];
|
||||
@@ -60,7 +66,10 @@ class PluginDescription{
|
||||
private $loadBefore = [];
|
||||
/** @var string */
|
||||
private $version;
|
||||
/** @var mixed[][] */
|
||||
/**
|
||||
* @var mixed[][]
|
||||
* @phpstan-var array<string, array<string, mixed>>
|
||||
*/
|
||||
private $commands = [];
|
||||
/** @var string */
|
||||
private $description = "";
|
||||
@@ -78,6 +87,7 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @param string|mixed[] $yamlString
|
||||
* @phpstan-param string|array<string, mixed> $yamlString
|
||||
*/
|
||||
public function __construct($yamlString){
|
||||
$this->loadMap(!is_array($yamlString) ? yaml_parse($yamlString) : $yamlString);
|
||||
@@ -85,6 +95,7 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @param mixed[] $plugin
|
||||
* @phpstan-param array<string, mixed> $plugin
|
||||
* @throws PluginException
|
||||
*/
|
||||
private function loadMap(array $plugin) : void{
|
||||
@@ -189,6 +200,7 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @return mixed[][]
|
||||
* @phpstan-return array<string, array<string, mixed>>
|
||||
*/
|
||||
public function getCommands() : array{
|
||||
return $this->commands;
|
||||
@@ -196,6 +208,7 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @return string[][]
|
||||
* @phpstan-return array<string, list<string>>
|
||||
*/
|
||||
public function getRequiredExtensions() : array{
|
||||
return $this->extensions;
|
||||
@@ -289,6 +302,7 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
* @phpstan-return array<string, mixed>
|
||||
*/
|
||||
public function getMap() : array{
|
||||
return $this->map;
|
||||
|
Reference in New Issue
Block a user