mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
added ability to disable emojis on signs
This commit is contained in:
parent
69d3321e16
commit
ccdea98d28
6 changed files with 21 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ class Player{
|
|||
|
||||
public static $experimentalHotbar = false;
|
||||
public static $allowDroppingSingleItems = true;
|
||||
public static $disableEmojisInChat = true;
|
||||
/** @var Config */
|
||||
public $data;
|
||||
/** @var Entity */
|
||||
|
|
@ -2502,7 +2503,7 @@ class Player{
|
|||
$this->server->api->console->run(substr($message, 1), $this);
|
||||
}else{
|
||||
$data = ["player" => $this, "message" => $message];
|
||||
if(Utils::hasEmoji($data["message"])){
|
||||
if(Player::$disableEmojisInChat && Utils::hasEmoji($data["message"])){
|
||||
$this->sendChat("Your message contains illegal characters");
|
||||
break;
|
||||
}
|
||||
|
|
@ -2712,6 +2713,7 @@ class Player{
|
|||
if($d["id"] !== TILE_SIGN){
|
||||
$t->spawn($this);
|
||||
}else{
|
||||
|
||||
$t->setText($d["Text1"], $d["Text2"], $d["Text3"], $d["Text4"]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue