changed direct public access of maniacontrol properties to using getter methods
This commit is contained in:
@ -39,7 +39,9 @@ class BillManager implements CallbackListener {
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
|
||||
|
||||
// Callbacks
|
||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,7 +59,7 @@ class BillManager implements CallbackListener {
|
||||
trigger_error("Function is not callable!");
|
||||
return false;
|
||||
}
|
||||
$bill = $this->maniaControl->client->sendBill($player->login, $amount, $message, $receiver);
|
||||
$bill = $this->maniaControl->getClient()->sendBill($player->login, $amount, $message, $receiver);
|
||||
$this->openBills[$bill] = new BillData($function, $player, $amount);
|
||||
return true;
|
||||
}
|
||||
@ -72,7 +74,7 @@ class BillManager implements CallbackListener {
|
||||
* @return bool
|
||||
*/
|
||||
public function sendPlanets(callable $function, $receiverLogin, $amount, $message) {
|
||||
$bill = $this->maniaControl->client->pay($receiverLogin, $amount, $message);
|
||||
$bill = $this->maniaControl->getClient()->pay($receiverLogin, $amount, $message);
|
||||
$this->openBills[$bill] = new BillData($function, $receiverLogin, $amount, true);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user