Skip to content

Commit

Permalink
added a message
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccoystephenson committed Jul 15, 2020
1 parent 7aa172f commit 91a76c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/spoilagesystem/Commands/ReloadCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ public ReloadCommand(Main plugin) {
public void reload(CommandSender sender) {
if (sender instanceof Player) {
Player player = (Player) sender;
if (player.hasPermission("fs.reload")) {
if (player.hasPermission("fs.reload") || player.hasPermission("fs.admin")) {
main.storage.loadValuesFromConfig();
player.sendMessage(ChatColor.GREEN + "Values loaded!");
}
else {
player.sendMessage(ChatColor.RED + "Sorry! In order to use this command you need the following permission: 'fs.reload'");
}
}
else {
main.storage.loadValuesFromConfig();
System.out.println("Values loaded!");
}
}

Expand Down

0 comments on commit 91a76c6

Please sign in to comment.