diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java index 30fdc88..be861e1 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java @@ -10,14 +10,14 @@ import org.bukkit.entity.Player; import java.util.UUID; @CommandPermissions(level = AdminLevel.SUPER, source = SourceType.ONLY_IN_GAME) -@CommandParameters(description = "Manages your admin login message and other utilities.", usage = "/ | setloginmessage >") +@CommandParameters(description = "Manages your admin login message and other various utilities.", usage = "/ | setlogin >") public class Command_myadmin extends FreedomCommand { @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { + final UUID uuid = sender_p.getUniqueId(); // Get the sender's uuid as a variable. if (args.length >= 2) { - if ("setloginmessage".equalsIgnoreCase(args[0])) { + if ("setlogin".equalsIgnoreCase(args[0])) { final String inputMessage = StringUtils.join(args, " ", 1, args.length); // Parse the input provided. - final UUID uuid = sender_p.getUniqueId(); // Get the sender's uuid as a variable. playerMsg(ChatColor.GRAY + "Set your custom login message."); // Notify player that the login message has been set. @@ -27,9 +27,7 @@ public class Command_myadmin extends FreedomCommand { AdminList.updateIndexLists(); // Update and refresh configuration. return true; } else if ("clear".equalsIgnoreCase(args[0])) { - if("loginmessage".equals(args[1])) { - final UUID uuid = sender_p.getUniqueId(); // Get the sender's uuid as a variable. - + if("loginmsg".equalsIgnoreCase(args[1])) { playerMsg(ChatColor.GRAY + "Cleared your custom login message."); // Notify player that the login message has been set. AdminList.getEntry(uuid).setCustomLoginMessage(""); // Set the custom login message to the value. @@ -38,9 +36,9 @@ public class Command_myadmin extends FreedomCommand { AdminList.updateIndexLists(); // Update and refresh configuration. return true; } else { - return false; + playerMsg(ChatColor.GRAY + "Invalid option, options are: loginmsg."); + return true; } - } else { return false; }