mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
PlayerChatEvent: replace hardcoded translation key with KnownTranslationKeys constant
This commit is contained in:
parent
9650b7f03a
commit
39e10da88d
@ -26,6 +26,7 @@ namespace pocketmine\event\player;
|
|||||||
use pocketmine\command\CommandSender;
|
use pocketmine\command\CommandSender;
|
||||||
use pocketmine\event\Cancellable;
|
use pocketmine\event\Cancellable;
|
||||||
use pocketmine\event\CancellableTrait;
|
use pocketmine\event\CancellableTrait;
|
||||||
|
use pocketmine\lang\KnownTranslationKeys;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ class PlayerChatEvent extends PlayerEvent implements Cancellable{
|
|||||||
/**
|
/**
|
||||||
* @param CommandSender[] $recipients
|
* @param CommandSender[] $recipients
|
||||||
*/
|
*/
|
||||||
public function __construct(Player $player, string $message, array $recipients, string $format = "chat.type.text"){
|
public function __construct(Player $player, string $message, array $recipients, string $format = KnownTranslationKeys::CHAT_TYPE_TEXT){
|
||||||
$this->player = $player;
|
$this->player = $player;
|
||||||
$this->message = $message;
|
$this->message = $message;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user