mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-25 14:57:08 +00:00
oops, remove test code
This commit is contained in:
parent
7a4b9a0367
commit
9b2b92ac1f
@ -24,8 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\event\player;
|
namespace pocketmine\event\player;
|
||||||
|
|
||||||
use pocketmine\command\CommandSender;
|
use pocketmine\command\CommandSender;
|
||||||
use pocketmine\event\AsyncEvent;
|
|
||||||
use pocketmine\event\AsyncEventTrait;
|
|
||||||
use pocketmine\event\Cancellable;
|
use pocketmine\event\Cancellable;
|
||||||
use pocketmine\event\CancellableTrait;
|
use pocketmine\event\CancellableTrait;
|
||||||
use pocketmine\player\chat\ChatFormatter;
|
use pocketmine\player\chat\ChatFormatter;
|
||||||
@ -35,9 +33,8 @@ use pocketmine\utils\Utils;
|
|||||||
/**
|
/**
|
||||||
* Called when a player chats something
|
* Called when a player chats something
|
||||||
*/
|
*/
|
||||||
class PlayerChatEvent extends PlayerEvent implements Cancellable, AsyncEvent{
|
class PlayerChatEvent extends PlayerEvent implements Cancellable{
|
||||||
use CancellableTrait;
|
use CancellableTrait;
|
||||||
use AsyncEventTrait;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param CommandSender[] $recipients
|
* @param CommandSender[] $recipients
|
||||||
|
@ -1513,13 +1513,10 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
|||||||
Timings::$playerCommand->stopTiming();
|
Timings::$playerCommand->stopTiming();
|
||||||
}else{
|
}else{
|
||||||
$ev = new PlayerChatEvent($this, $messagePart, $this->server->getBroadcastChannelSubscribers(Server::BROADCAST_CHANNEL_USERS), new StandardChatFormatter());
|
$ev = new PlayerChatEvent($this, $messagePart, $this->server->getBroadcastChannelSubscribers(Server::BROADCAST_CHANNEL_USERS), new StandardChatFormatter());
|
||||||
$ev->callAsync()
|
$ev->call();
|
||||||
->onCompletion(function() use ($ev) {
|
if(!$ev->isCancelled()){
|
||||||
if(!$ev->isCancelled()){
|
$this->server->broadcastMessage($ev->getFormatter()->format($ev->getPlayer()->getDisplayName(), $ev->getMessage()), $ev->getRecipients());
|
||||||
$this->server->broadcastMessage($ev->getFormatter()->format($ev->getPlayer()->getDisplayName(), $ev->getMessage()), $ev->getRecipients());
|
}
|
||||||
}
|
|
||||||
}, function (){
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user