From b8159687662b120ad34551cb6cff0922b0aec9d9 Mon Sep 17 00:00:00 2001 From: Vega Nicholas S <142091702+nicholass003@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:54:13 +0700 Subject: [PATCH] [FIX] : Shadowing on plugin property (#430) --- .github/workflows/main.yml | 2 +- .../PiggyCustomEnchants/commands/CustomEnchantsCommand.php | 3 ++- .../commands/subcommands/AboutSubCommand.php | 3 ++- .../commands/subcommands/EnchantSubCommand.php | 3 ++- .../commands/subcommands/InfoSubCommand.php | 3 ++- .../commands/subcommands/ListSubCommand.php | 3 ++- .../PiggyCustomEnchants/commands/subcommands/NBTSubCommand.php | 3 ++- .../commands/subcommands/RemoveSubCommand.php | 3 ++- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4e6c67a..4d707b85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - name: Download Virion Dependencies run: | wget -O vendor/FormsUI.phar https://poggit.pmmp.io/r/209836/FormsUI_dev-20.phar - wget -O vendor/Commando.phar https://poggit.pmmp.io/r/216831/Commando_dev-34.phar + wget -O vendor/Commando.phar https://poggit.pmmp.io/r/233076/Commando_dev-41.phar wget -O vendor/libPiggyUpdateChecker.phar https://poggit.pmmp.io/r/211732/libPiggyUpdateChecker_dev-2.phar wget -O vendor/Customies.phar https://poggit.pmmp.io/r/216154/Customies.phar - name: Run PHPStan diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php index 00855c43..7bdb85b0 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php @@ -15,13 +15,14 @@ use DaPigGuy\PiggyCustomEnchants\PiggyCustomEnchants; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Vecnavium\FormsUI\SimpleForm; class CustomEnchantsCommand extends BaseCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/AboutSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/AboutSubCommand.php index c7d79a21..7e36ab24 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/AboutSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/AboutSubCommand.php @@ -8,13 +8,14 @@ use DaPigGuy\PiggyCustomEnchants\PiggyCustomEnchants; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Vecnavium\FormsUI\SimpleForm; class AboutSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php index 8cad22d3..66dcdc7b 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php @@ -16,6 +16,7 @@ use pocketmine\item\enchantment\EnchantmentInstance; use pocketmine\item\ItemTypeIds; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Ramsey\Uuid\Uuid; use Vecnavium\FormsUI\CustomForm; @@ -23,7 +24,7 @@ class EnchantSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/InfoSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/InfoSubCommand.php index 937bbf88..881c27b6 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/InfoSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/InfoSubCommand.php @@ -13,6 +13,7 @@ use DaPigGuy\PiggyCustomEnchants\utils\Utils; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Vecnavium\FormsUI\CustomForm; use Vecnavium\FormsUI\SimpleForm; @@ -20,7 +21,7 @@ class InfoSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/ListSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/ListSubCommand.php index 7cbf2886..45d138a6 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/ListSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/ListSubCommand.php @@ -11,13 +11,14 @@ use DaPigGuy\PiggyCustomEnchants\utils\Utils; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Vecnavium\FormsUI\SimpleForm; class ListSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/NBTSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/NBTSubCommand.php index 5c06d8ee..f496029b 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/NBTSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/NBTSubCommand.php @@ -8,12 +8,13 @@ use DaPigGuy\PiggyCustomEnchants\PiggyCustomEnchants; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; class NBTSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void { diff --git a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/RemoveSubCommand.php b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/RemoveSubCommand.php index 82ebca68..b2cc1a18 100644 --- a/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/RemoveSubCommand.php +++ b/src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/RemoveSubCommand.php @@ -12,13 +12,14 @@ use DaPigGuy\PiggyCustomEnchants\utils\Utils; use pocketmine\command\CommandSender; use pocketmine\player\Player; +use pocketmine\plugin\Plugin; use pocketmine\utils\TextFormat; use Vecnavium\FormsUI\CustomForm; class RemoveSubCommand extends BaseSubCommand { /** @var PiggyCustomEnchants */ - protected $plugin; + protected Plugin $plugin; public function onRun(CommandSender $sender, string $aliasUsed, array $args): void {