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 82e37db..d7166f7 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_myadmin.java @@ -16,7 +16,7 @@ public class Command_myadmin extends FreedomCommand { final UUID uuid = sender_p.getUniqueId(); // Get the sender's uuid as a variable. if(args.length == 1) { if ("clearloginmsg".equalsIgnoreCase(args[0])) { - playerMsg(ChatColor.GRAY + "Cleared your custom login message."); // Notify player that the login message has been set. + playerMsg(sender, 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. AdminList.save(AdminList.getEntry(uuid)); // Save the modified value to the super admin configuration. @@ -29,9 +29,9 @@ public class Command_myadmin extends FreedomCommand { } else if (args.length >= 2) { if ("setlogin".equalsIgnoreCase(args[0])) { final String inputMessage = StringUtils.join(args, " ", 1, args.length); // Parse the input provided. - playerMsg(ChatColor.GRAY + "Set your custom login message."); // Notify player that the login message has been set. - playerMsg(ChatColor.GRAY + "Your login message will show up as: \n" + ChatColor.AQUA + sender_p.getPlayer().getName() + " is " + ChatColor.translateAlternateColorCodes('&', inputMessage)); - AdminList.getEntry(uuid).setCustomLoginMessage(inputMessage); // Set the custom login message to the value. + playerMsg(sender, ChatColor.GRAY + "Set your custom login message."); // Notify player that the login message has been set. + playerMsg(sender, ChatColor.GRAY + "Your login message will show up as: \n" + ChatColor.AQUA + sender_p.getPlayer().getName() + " is " + ChatColor.translateAlternateColorCodes('&', inputMessage)); + AdminList.getEntry(uuid).setCustomLoginMessage(inputMessage); // Set the custom login message to the value. AdminList.save(AdminList.getEntry(uuid)); // Save the modified value to the super admin configuration. AdminList.updateIndexLists(); // Update and refresh configuration. @@ -43,4 +43,4 @@ public class Command_myadmin extends FreedomCommand { return false; } } -} +} \ No newline at end of file diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_wildcard.java b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_wildcard.java index 7757e26..ccb9148 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_wildcard.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_wildcard.java @@ -8,6 +8,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandParameters(description = "Run any command on all users, username placeholder = ?.", usage = "/ [fluff] ? [fluff] ?") public class Command_wildcard extends FreedomCommand { @Override public boolean run(CommandSender sender, org.bukkit.entity.Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { @@ -16,9 +17,9 @@ public class Command_wildcard extends FreedomCommand { } String arguments = String.join(" ", args); - + if (arguments.toLowerCase().contains("wildcard") || arguments.toLowerCase().contains("gcmd")) { - playerMsg("What the hell are you trying to do, you stupid idiot...", ChatColor.RED); + playerMsg(sender, "What the hell are you trying to do, you stupid idiot...", ChatColor.RED); return true; } if (arguments.toLowerCase().contains("gtfo")) @@ -54,4 +55,4 @@ public class Command_wildcard extends FreedomCommand { return true; } -} +} \ No newline at end of file