Fixed /help and //help for double commands
This commit is contained in:
parent
9653658f06
commit
5785fc41e9
@ -61,7 +61,7 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
$showCommands = array();
|
$showCommands = array();
|
||||||
$registeredMethods = array();
|
$registeredMethods = array();
|
||||||
foreach(array_reverse($this->adminCommands) as $command) {
|
foreach(array_reverse($this->adminCommands) as $command) {
|
||||||
if(array_key_exists($command['Method'], $registeredMethods) && $showCommands[$command['Method']]['Description'] == $command['Description']) {
|
if(array_key_exists($command['Method'], $registeredMethods) && $showCommands[$registeredMethods[$command['Method']]]['Description'] == $command['Description']) {
|
||||||
$name = $registeredMethods[$command['Method']];
|
$name = $registeredMethods[$command['Method']];
|
||||||
$showCommands[$name]['Name'] .= '|'.$command['Name'];
|
$showCommands[$name]['Name'] .= '|'.$command['Name'];
|
||||||
} else {
|
} else {
|
||||||
@ -92,7 +92,7 @@ class HelpManager implements CommandListener, CallbackListener {
|
|||||||
$showCommands = array();
|
$showCommands = array();
|
||||||
$registeredMethods = array();
|
$registeredMethods = array();
|
||||||
foreach(array_reverse($this->playerCommands) as $command) {
|
foreach(array_reverse($this->playerCommands) as $command) {
|
||||||
if(array_key_exists($command['Method'], $registeredMethods) && $showCommands[$command['Method']]['Description'] == $command['Description']) {
|
if(array_key_exists($command['Method'], $registeredMethods) && $showCommands[$registeredMethods[$command['Method']]]['Description'] == $command['Description']) {
|
||||||
$name = $registeredMethods[$command['Method']];
|
$name = $registeredMethods[$command['Method']];
|
||||||
$showCommands[$name]['Name'] .= '|'.$command['Name'];
|
$showCommands[$name]['Name'] .= '|'.$command['Name'];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user