reload permissions

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

View File

@ -131,11 +131,21 @@ public class boosCoolDown extends JavaPlugin {
public boolean onCommand(CommandSender sender, Command c, public boolean onCommand(CommandSender sender, Command c,
String commandLabel, String[] args) { String commandLabel, String[] args) {
String command = c.getName().toLowerCase(); String command = c.getName().toLowerCase();
if (command.equalsIgnoreCase("boosCooldowns")) { if (usingPermissions) {
boosConfigManager.reload(); if (permissions.has(sender, "booscooldowns.reload")
boosChat.sendMessageToCommandSender(sender, && command.equalsIgnoreCase("boosCooldowns")) {
"&6[" + pdfFile.getName() + "]" + " config reloaded"); boosConfigManager.reload();
return true; 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; return false;
} }