public function getCommand($name)
{
$command = $this->getServer()->getPluginCommand($name);
if ($command === null or $command->getPlugin() !== $this) {
$command = $this->getServer()->getPluginCommand(strtolower($this->description->getName()) . ":" . $name);
}
if ($command instanceof PluginIdentifiableCommand and $command->getPlugin() === $this) {
return $command;
} else {
return null;
}
}