From 4cd6d909ade03253e1253aa1311485e602344999 Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 9 May 2014 23:04:11 +0200 Subject: [PATCH] append player data to player object --- application/core/Players/Player.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/application/core/Players/Player.php b/application/core/Players/Player.php index 0b14435b..6e16875d 100644 --- a/application/core/Players/Player.php +++ b/application/core/Players/Player.php @@ -274,6 +274,32 @@ class Player { $this->cache = array(); } + + /** + * Gets the Player Data + * + * @param $object + * @param $dataName + * @param $serverIndex + * @return mixed|null + */ + public function getPlayerData($object, $dataName, $serverIndex = -1) { + return $this->maniaControl->playerManager->playerDataManager->getPlayerData($object, $dataName, $this, $serverIndex); + } + + /** + * Sets the Player Data + * + * @param $object + * @param $dataName + * @param $value + * @param $serverIndex + * @return bool + */ + public function setPlayerData($object, $dataName, $value, $serverIndex = -1) { + return $this->maniaControl->playerManager->playerDataManager->setPlayerData($object, $dataName, $this, $value, $serverIndex); + } + /** * Var_Dump the Player */