dedimania fix tries
This commit is contained in:
parent
f2948c1a0c
commit
8d17c3936e
@ -67,7 +67,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
*/
|
*/
|
||||||
/** @var ManiaControl $maniaControl */
|
/** @var ManiaControl $maniaControl */
|
||||||
private $maniaControl = null;
|
private $maniaControl = null;
|
||||||
// TODO: there are several spots where $dedimaniaData is null - fix those (look for !$this->dedimaniaData)
|
// TODO: there are several spots where $dedimaniaData is null - fix those (look for !$this->dedimaniaData) -> Tried to fix (Remove this TODO if it works in next release)
|
||||||
/** @var DedimaniaData $dedimaniaData */
|
/** @var DedimaniaData $dedimaniaData */
|
||||||
private $dedimaniaData = null;
|
private $dedimaniaData = null;
|
||||||
private $updateManialink = false;
|
private $updateManialink = false;
|
||||||
@ -272,7 +272,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function fetchDedimaniaRecords($reset = true) {
|
private function fetchDedimaniaRecords($reset = true) {
|
||||||
if (!$this->dedimaniaData || !$this->dedimaniaData->sessionId) {
|
if ($this->dedimaniaData == null || !$this->dedimaniaData->sessionId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function handlePlayerConnect(Player $player) {
|
public function handlePlayerConnect(Player $player) {
|
||||||
if (!$this->dedimaniaData) {
|
if ($this->dedimaniaData == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -653,7 +653,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function handlePlayerDisconnect(Player $player) {
|
public function handlePlayerDisconnect(Player $player) {
|
||||||
if (!$this->dedimaniaData) {
|
if ($this->dedimaniaData == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->dedimaniaData->removePlayer($player->login);
|
$this->dedimaniaData->removePlayer($player->login);
|
||||||
@ -691,7 +691,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* Handle EndMap Callback
|
* Handle EndMap Callback
|
||||||
*/
|
*/
|
||||||
public function handleMapEnd() {
|
public function handleMapEnd() {
|
||||||
if (!$this->dedimaniaData || !$this->dedimaniaData->records) {
|
if ($this->dedimaniaData == null || !$this->dedimaniaData->records) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,7 +845,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @param RecordCallback $callback
|
* @param RecordCallback $callback
|
||||||
*/
|
*/
|
||||||
public function handleFinishCallback(RecordCallback $callback) {
|
public function handleFinishCallback(RecordCallback $callback) {
|
||||||
if ($this->dedimaniaData != null || !$this->dedimaniaData->records) {
|
if ($this->dedimaniaData == null || !$this->dedimaniaData->records) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($callback->isLegacyCallback) {
|
if ($callback->isLegacyCallback) {
|
||||||
@ -904,7 +904,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @return RecordData $record
|
* @return RecordData $record
|
||||||
*/
|
*/
|
||||||
private function getDedimaniaRecord($login) {
|
private function getDedimaniaRecord($login) {
|
||||||
if ($this->dedimaniaData != null || !$this->dedimaniaData->records) {
|
if ($this->dedimaniaData == null || !$this->dedimaniaData->records) {
|
||||||
return new RecordData(null);
|
return new RecordData(null);
|
||||||
}
|
}
|
||||||
$records = $this->dedimaniaData->records;
|
$records = $this->dedimaniaData->records;
|
||||||
@ -945,7 +945,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function insertDedimaniaRecord(RecordData &$newRecord, RecordData $oldRecord) {
|
private function insertDedimaniaRecord(RecordData &$newRecord, RecordData $oldRecord) {
|
||||||
if ($this->dedimaniaData != null || !$this->dedimaniaData->records || $newRecord->nullRecord) {
|
if ($this->dedimaniaData == null || !$this->dedimaniaData->records || $newRecord->nullRecord) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user