From 6cdb29aa08ade1b6aa505f3ce36563be1665690f Mon Sep 17 00:00:00 2001 From: nicholass003 Date: Thu, 4 Apr 2024 15:36:23 +0700 Subject: [PATCH 1/2] fix: shadowing on plugin property from CortexPE\Commando\BaseCommand class --- .../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 ++- 7 files changed, 14 insertions(+), 7 deletions(-) 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 { From 3e904b8990b938701222848a73617354bc81fcd3 Mon Sep 17 00:00:00 2001 From: nicholass003 Date: Fri, 5 Apr 2024 21:00:50 +0700 Subject: [PATCH 2/2] chore: update Commando virion --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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