mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
TesterPlugin: removed usage of deprecated ServerCommandEvent
This commit is contained in:
parent
8304675af7
commit
21e7b5ea43
@ -1,7 +1,7 @@
|
|||||||
name: TesterPlugin
|
name: TesterPlugin
|
||||||
main: pmmp\TesterPlugin\Main
|
main: pmmp\TesterPlugin\Main
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
api: [3.0.0]
|
api: [3.2.0]
|
||||||
load: POSTWORLD
|
load: POSTWORLD
|
||||||
author: pmmp
|
author: pmmp
|
||||||
description: Plugin used to run tests on PocketMine-MP
|
description: Plugin used to run tests on PocketMine-MP
|
||||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pmmp\TesterPlugin;
|
namespace pmmp\TesterPlugin;
|
||||||
|
|
||||||
use pocketmine\event\Listener;
|
use pocketmine\event\Listener;
|
||||||
use pocketmine\event\server\ServerCommandEvent;
|
use pocketmine\event\server\CommandEvent;
|
||||||
use pocketmine\plugin\PluginBase;
|
use pocketmine\plugin\PluginBase;
|
||||||
|
|
||||||
class Main extends PluginBase implements Listener{
|
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
|
//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
|
//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
|
//be asynchronous tests running. Instead we cancel this and stop the server of our own accord once all tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user