Updated RakLib, fixed help message not showing command, added documentation to Plugin->getResource()

This commit is contained in:
Shoghi Cervantes
2015-01-14 17:23:16 +01:00
parent 9fac990b19
commit 24c6cca664
7 changed files with 25 additions and 19 deletions

View File

@@ -87,11 +87,11 @@ class HelpCommand extends VanillaCommand{
return true;
}else{
if(($command = $sender->getServer()->getCommandMap()->getCommand(strtolower($command))) instanceof Command){
if($command->testPermissionSilent($sender)){
$message = TextFormat::YELLOW . "--------- " . TextFormat::WHITE . " Help: /" . $command->getName() . TextFormat::YELLOW . " ---------\n";
$message .= TextFormat::GOLD . "Description: " . TextFormat::WHITE . $command->getDescription() . "\n";
$message .= TextFormat::GOLD . "Usage: " . TextFormat::WHITE . implode("\n" . TextFormat::WHITE, explode("\n", $command->getUsage())) . "\n";
if(($cmd = $sender->getServer()->getCommandMap()->getCommand(strtolower($command))) instanceof Command){
if($cmd->testPermissionSilent($sender)){
$message = TextFormat::YELLOW . "--------- " . TextFormat::WHITE . " Help: /" . $cmd->getName() . TextFormat::YELLOW . " ---------\n";
$message .= TextFormat::GOLD . "Description: " . TextFormat::WHITE . $cmd->getDescription() . "\n";
$message .= TextFormat::GOLD . "Usage: " . TextFormat::WHITE . implode("\n" . TextFormat::WHITE, explode("\n", $cmd->getUsage())) . "\n";
$sender->sendMessage($message);
return true;