player action weired exception fix
This commit is contained in:
parent
e5278e6987
commit
fc7b1bdade
@ -385,15 +385,21 @@ class PlayerActions {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
if ($target->isFakePlayer()) {
|
if ($target->isFakePlayer()) {
|
||||||
|
try {
|
||||||
$this->maniaControl->getClient()->disconnectFakePlayer($target->login);
|
$this->maniaControl->getClient()->disconnectFakePlayer($target->login);
|
||||||
} else {
|
} catch (PlayerStateException $e) {
|
||||||
$this->maniaControl->getClient()->kick($target->login, $message);
|
$this->maniaControl->getChat()->sendException($e, $admin);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
$this->maniaControl->getClient()->kick($target->login, $message);
|
||||||
|
} catch (UnknownPlayerException $e) {
|
||||||
|
$this->maniaControl->getChat()->sendException($e, $admin);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} catch (UnknownPlayerException $e) {
|
|
||||||
$this->maniaControl->getChat()->sendException($e, $admin);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce kick
|
// Announce kick
|
||||||
@ -560,5 +566,5 @@ class PlayerActions {
|
|||||||
return $player->isMuted();
|
return $player->isMuted();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user