mirror of
https://github.com/LordBoos/boosCooldowns.git
synced 2024-11-01 16:29:29 +01:00
reload permissions
This commit is contained in:
parent
1e94a7f10e
commit
cfd05618a4
@ -131,12 +131,22 @@ 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) {
|
||||||
|
if (permissions.has(sender, "booscooldowns.reload")
|
||||||
|
&& command.equalsIgnoreCase("boosCooldowns")) {
|
||||||
boosConfigManager.reload();
|
boosConfigManager.reload();
|
||||||
boosChat.sendMessageToCommandSender(sender,
|
boosChat.sendMessageToCommandSender(sender,
|
||||||
"&6[" + pdfFile.getName() + "]" + " config reloaded");
|
"&6[" + pdfFile.getName() + "]" + " config reloaded");
|
||||||
return true;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user