mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Disallow sending empty chat messages
This commit is contained in:
parent
45267ea074
commit
e43b4e67c6
1 changed files with 7 additions and 5 deletions
|
|
@ -1304,11 +1304,13 @@ class Player{
|
|||
break;
|
||||
}
|
||||
$message = $data["message"];
|
||||
if($message{0} === "/"){ //Command
|
||||
$this->server->api->console->run(substr($message, 1), $this);
|
||||
}else{
|
||||
if($this->server->api->dhandle("player.chat", array("player" => $this, "message" => $message)) !== false){
|
||||
$this->server->api->chat->send($this, $message);
|
||||
if(trim($data["message"]) != ""){
|
||||
if($message{0} === "/"){ //Command
|
||||
$this->server->api->console->run(substr($message, 1), $this);
|
||||
}else{
|
||||
if($this->server->api->dhandle("player.chat", array("player" => $this, "message" => $message)) !== false){
|
||||
$this->server->api->chat->send($this, $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue