TesterPlugin: removed usage of deprecated ServerCommandEvent

This commit is contained in:
Dylan K. Taylor 2018-08-19 14:05:26 +01:00
parent 8304675af7
commit 21e7b5ea43
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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