mirror of
https://github.com/LordBoos/boosCooldowns.git
synced 2024-11-23 11:05:44 +01:00
reload permissions
This commit is contained in:
parent
1e94a7f10e
commit
cfd05618a4
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user