prevent non-object access error

This commit is contained in:
Steffen Schröder 2014-06-26 19:45:54 +02:00
parent 1a021c0189
commit 1dbcf486fb

View File

@ -559,6 +559,10 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @param Player $player
*/
public function handlePlayerConnect(Player $player) {
if (!isset($this->dedimaniaData)) {
return;
}
// Send Dedimania request
$data = array($this->dedimaniaData->sessionId, $player->login, $player->rawNickname, $player->path, $player->isSpectator);
$content = $this->encode_request(self::DEDIMANIA_PLAYERCONNECT, $data);