Fixed /help and //help for double commands

This commit is contained in:
Max Klaversma 2014-05-01 01:55:04 +02:00 committed by Steffen Schröder
parent 9653658f06
commit 5785fc41e9

View File

@ -61,7 +61,7 @@ class HelpManager implements CommandListener, CallbackListener {
$showCommands = array();
$registeredMethods = array();
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']];
$showCommands[$name]['Name'] .= '|'.$command['Name'];
} else {
@ -92,7 +92,7 @@ class HelpManager implements CommandListener, CallbackListener {
$showCommands = array();
$registeredMethods = array();
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']];
$showCommands[$name]['Name'] .= '|'.$command['Name'];
} else {