aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/MylesAndMore/tumble/commands/ReloadCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/MylesAndMore/tumble/commands/ReloadCommand.java b/src/main/java/com/MylesAndMore/tumble/commands/ReloadCommand.java
index a12f381..844241d 100644
--- a/src/main/java/com/MylesAndMore/tumble/commands/ReloadCommand.java
+++ b/src/main/java/com/MylesAndMore/tumble/commands/ReloadCommand.java
@@ -10,15 +10,15 @@ public class ReloadCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
// Check if the sender has perms to run command
- if (!sender.hasPermission("tumble.reload")) {
- // If sender does not have permission, display them the permissionMessage from the config
- sender.sendMessage(ChatColor.RED + PluginManager.getPlugin().getConfig().getString("permissionMessage"));
- }
- else {
+ if (sender.hasPermission("tumble.reload")) {
// If sender does have permission, reload the plugin's config and display a confirmation message
PluginManager.getPlugin().reloadConfig();
sender.sendMessage(ChatColor.GREEN + "Tumble configuration reloaded successfully.");
}
+ else {
+ // If sender does not have permission, display them the permissionMessage from the config
+ sender.sendMessage(ChatColor.RED + PluginManager.getPermissionMessage());
+ }
return true;
}
}