Fix /plugins crash

This commit is contained in:
PEMapModder 2014-06-23 19:27:27 +08:00
parent fd4fc4ff94
commit 2e50fbbda4

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";
}
}
}