reload permissions

This commit is contained in:
Boos 2011-12-30 21:20:30 +01:00
parent 1e94a7f10e
commit cfd05618a4

View File

@ -131,12 +131,22 @@ public class boosCoolDown extends JavaPlugin {
public boolean onCommand(CommandSender sender, Command c,
String commandLabel, String[] args) {
String command = c.getName().toLowerCase();
if (command.equalsIgnoreCase("boosCooldowns")) {
if (usingPermissions) {
if (permissions.has(sender, "booscooldowns.reload")
&& command.equalsIgnoreCase("boosCooldowns")) {
boosConfigManager.reload();
boosChat.sendMessageToCommandSender(sender,
"&6[" + pdfFile.getName() + "]" + " config reloaded");
return true;
}
} else {
if (sender.isOp() && command.equalsIgnoreCase("boosCooldowns")) {
boosConfigManager.reload();
boosChat.sendMessageToCommandSender(sender,
"&6[" + pdfFile.getName() + "]" + " config reloaded");
return true;
}
}
return false;
}