small cleanup help-manager
This commit is contained in:
parent
f0a33ac5a2
commit
95a6e3e6a3
@ -19,7 +19,6 @@ use ManiaControl\Players\Player;
|
|||||||
* @copyright 2014-2015 ManiaControl Team
|
* @copyright 2014-2015 ManiaControl Team
|
||||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class HelpManager implements CommandListener, CallbackListener {
|
class HelpManager implements CommandListener, CallbackListener {
|
||||||
/*
|
/*
|
||||||
* Private properties
|
* Private properties
|
||||||
@ -62,7 +61,7 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
$message = $this->parseHelpList($this->adminCommands);
|
$message = $this->parseHelpList($this->adminCommands);
|
||||||
|
|
||||||
// Show message when it's not empty
|
// Show message when it's not empty
|
||||||
if($message != NULL){
|
if ($message != null) {
|
||||||
$message = 'Supported Admin Commands: ' . $message;
|
$message = 'Supported Admin Commands: ' . $message;
|
||||||
$this->maniaControl->getChat()->sendChat($message, $player);
|
$this->maniaControl->getChat()->sendChat($message, $player);
|
||||||
}
|
}
|
||||||
@ -79,7 +78,7 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
$message = $this->parseHelpList($this->playerCommands);
|
$message = $this->parseHelpList($this->playerCommands);
|
||||||
|
|
||||||
// Show message when it's not empty
|
// Show message when it's not empty
|
||||||
if($message != NULL){
|
if ($message != null) {
|
||||||
$message = 'Supported Player Commands: ' . $message;
|
$message = 'Supported Player Commands: ' . $message;
|
||||||
$this->maniaControl->getChat()->sendChat($message, $player);
|
$this->maniaControl->getChat()->sendChat($message, $player);
|
||||||
}
|
}
|
||||||
@ -97,6 +96,7 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse list with commands from array
|
* Parse list with commands from array
|
||||||
|
*
|
||||||
* @param array $commands
|
* @param array $commands
|
||||||
* @param bool $isHelpAll
|
* @param bool $isHelpAll
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
@ -130,15 +130,12 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
$message .= $command['Name'] . ',';
|
$message .= $command['Name'] . ',';
|
||||||
}
|
}
|
||||||
$message = substr($message, 0, -1);
|
$message = substr($message, 0, -1);
|
||||||
|
|
||||||
return $message;
|
|
||||||
} else {
|
} else {
|
||||||
if($player != NULL){
|
if ($player != null) {
|
||||||
$this->showHelpAllList($showCommands, $player);
|
$this->showHelpAllList($showCommands, $player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $message;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user