mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Merge pull request #975 from wiezz/master
Allow chat plugins to work with eachother
This commit is contained in:
commit
8543c06db4
1 changed files with 7 additions and 2 deletions
|
|
@ -1922,8 +1922,13 @@ class Player{
|
|||
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);
|
||||
$data = array("player" => $this, "message" => $message);
|
||||
if($this->server->api->handle("player.chat", $data) !== false){
|
||||
if(isset($data["message"])){
|
||||
$this->server->api->chat->send($this, $data["message"]);
|
||||
}else{
|
||||
$this->server->api->chat->send($this, $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue