From 21e7b5ea4326d0ebc22e6eb86e1dfa3e6ecada61 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 19 Aug 2018 14:05:26 +0100 Subject: [PATCH] TesterPlugin: removed usage of deprecated ServerCommandEvent --- tests/plugins/TesterPlugin/plugin.yml | 2 +- tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/plugins/TesterPlugin/plugin.yml b/tests/plugins/TesterPlugin/plugin.yml index 48a9dd2e3..9314ce5f4 100644 --- a/tests/plugins/TesterPlugin/plugin.yml +++ b/tests/plugins/TesterPlugin/plugin.yml @@ -1,7 +1,7 @@ name: TesterPlugin main: pmmp\TesterPlugin\Main version: 0.1.0 -api: [3.0.0] +api: [3.2.0] load: POSTWORLD author: pmmp description: Plugin used to run tests on PocketMine-MP diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php index 7ef0bcee6..12308b23e 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace pmmp\TesterPlugin; use pocketmine\event\Listener; -use pocketmine\event\server\ServerCommandEvent; +use pocketmine\event\server\CommandEvent; use pocketmine\plugin\PluginBase; class Main extends PluginBase implements Listener{ @@ -48,7 +48,7 @@ class Main extends PluginBase implements Listener{ ]; } - public function onServerCommand(ServerCommandEvent $event){ + public function onServerCommand(CommandEvent $event){ //The CI will send this command as a failsafe to prevent the build from hanging if the tester plugin failed to //run. However, if the plugin loaded successfully we don't want to allow this to stop the server as there may //be asynchronous tests running. Instead we cancel this and stop the server of our own accord once all tests