Allow chat plugins to work with eachother

This commit is contained in:
Wies 2013-12-03 18:26:38 +01:00
parent fd2eb7b230
commit 736c233e76

View File

@ -1922,8 +1922,9 @@ 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){
$this->server->api->chat->send($this, $data["message"]);
}
}
}