Merge pull request #1525 from PEMapModder/patch-1

Fix /plugins crash
This commit is contained in:
Shoghi Cervantes 2014-06-23 14:00:26 +02:00
commit 6c8f189499

View File

@ -41,12 +41,12 @@ class PluginsCommand extends VanillaCommand{
return true;
}
$sender->sendMessage("Plugins " . $this->getPluginList());
$sender->sendMessage("Plugins " . $this->getPluginList($sender));
return true;
}
private function getPluginList(){
private function getPluginList(CommandSender $sender){
$list = "";
foreach(($plugins = $sender->getServer()->getPluginManager()->getPlugins()) as $plugin){
if(strlen($list) > 0){
@ -58,4 +58,4 @@ class PluginsCommand extends VanillaCommand{
return "(" . count($plugins) . "): $list";
}
}
}