From 736c233e7658806815210f8e7e162ab90d9ac53e Mon Sep 17 00:00:00 2001 From: Wies Date: Tue, 3 Dec 2013 18:26:38 +0100 Subject: [PATCH] Allow chat plugins to work with eachother --- src/Player.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index f1551570..2845ae5a 100644 --- a/src/Player.php +++ b/src/Player.php @@ -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"]); } } }