mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +00:00
Disallow sending empty chat messages
This commit is contained in:
parent
45267ea074
commit
e43b4e67c6
@ -1304,6 +1304,7 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$message = $data["message"];
|
$message = $data["message"];
|
||||||
|
if(trim($data["message"]) != ""){
|
||||||
if($message{0} === "/"){ //Command
|
if($message{0} === "/"){ //Command
|
||||||
$this->server->api->console->run(substr($message, 1), $this);
|
$this->server->api->console->run(substr($message, 1), $this);
|
||||||
}else{
|
}else{
|
||||||
@ -1311,6 +1312,7 @@ class Player{
|
|||||||
$this->server->api->chat->send($this, $message);
|
$this->server->api->chat->send($this, $message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MC_CONTAINER_CLOSE:
|
case MC_CONTAINER_CLOSE:
|
||||||
if($this->spawned === false){
|
if($this->spawned === false){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user