fix & improvement of dynamic point limit command
This commit is contained in:
parent
7d9c1b5fde
commit
615010e824
@ -161,7 +161,7 @@ class DynamicPointLimitPlugin implements CallbackListener, CommandListener, Plug
|
||||
*/
|
||||
public function commandSetPointlimit(array $chatCallback, Player $player) {
|
||||
$commandParts = explode(' ', $chatCallback[1][2]);
|
||||
if ($commandParts < 2) {
|
||||
if (count($commandParts) < 2) {
|
||||
$this->maniaControl->chat->sendUsageInfo('Example: //setpointlimit auto', $player);
|
||||
return;
|
||||
}
|
||||
@ -180,9 +180,13 @@ class DynamicPointLimitPlugin implements CallbackListener, CommandListener, Plug
|
||||
try {
|
||||
$this->maniaControl->client->setModeScriptSettings(array('S_MapPointsLimit' => $value));
|
||||
$this->staticMode = true;
|
||||
$this->lastPointLimit = $value;
|
||||
$this->maniaControl->chat->sendInformation("PointLimit changed to: {$value} (Fixed)");
|
||||
} catch (GameModeException $e) {
|
||||
} catch (GameModeException $exception) {
|
||||
$this->maniaControl->chat->sendException($exception, $player);
|
||||
}
|
||||
} else {
|
||||
$this->maniaControl->chat->sendUsageInfo('Example: //setpointlimit 150', $player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user