Removed deprecated ServerCommandEvent and RemoteServerCommandEvent

if you get rekt by these changes... USE A RELEASE like we've been telling you for so long!
This commit is contained in:
Dylan K. Taylor
2018-08-19 14:23:41 +01:00
parent b629738312
commit 475ec413e5
4 changed files with 2 additions and 130 deletions

View File

@@ -42,7 +42,6 @@ use pocketmine\event\player\PlayerDataSaveEvent;
use pocketmine\event\server\CommandEvent;
use pocketmine\event\server\DataPacketBroadcastEvent;
use pocketmine\event\server\QueryRegenerateEvent;
use pocketmine\event\server\ServerCommandEvent;
use pocketmine\inventory\CraftingManager;
use pocketmine\item\enchantment\Enchantment;
use pocketmine\item\Item;
@@ -1979,10 +1978,7 @@ class Server{
public function checkConsole(){
Timings::$serverCommandTimer->startTiming();
while(($line = $this->console->getLine()) !== null){
$this->pluginManager->callEvent($ev = new ServerCommandEvent($this->consoleSender, $line));
if(!$ev->isCancelled()){
$this->dispatchCommand($ev->getSender(), $ev->getCommand());
}
$this->dispatchCommand($this->consoleSender, $line);
}
Timings::$serverCommandTimer->stopTiming();
}