emojis cant be send in chat anymore

This commit is contained in:
GameHerobrine 2022-08-28 12:24:20 +03:00
parent 5e45d6160c
commit 732591f174
2 changed files with 9 additions and 2 deletions

View file

@ -2042,6 +2042,10 @@ class Player{
$this->server->api->console->run(substr($message, 1), $this);
}else{
$data = ["player" => $this, "message" => $message];
if(Utils::hasEmoji($data["message"])){
$this->sendChat("Your message contains illegal characters");
break;
}
if($this->server->api->handle("player.chat", $data) !== false){
$this->server->send2Discord("<" . $this->username . "> " . $message);
if(isset($data["message"])){