Conversation
src/main/java/me/totalfreedom/totalfreedommod/command/Command_nickclean.java
Outdated
Show resolved
Hide resolved
sorry for being nitpicky but i think you should update the description of the command to reflect the changes made here |
@@ -12,7 +12,7 @@ | |||
import org.bukkit.entity.Player; | |||
|
|||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH) | |||
@CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of all players on server.", usage = "/<command>", aliases = "nc") | |||
@CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of all players on server.", usage = "/<command> <player | -a>", aliases = "nc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer is accurately describing what the command does.
FUtil.adminAction(sender.getName(), "Cleaning all nicknames", false); | ||
|
||
for (final Player player : server.getOnlinePlayers()) | ||
if (args.length != 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to default to current behavior?
final String playerName = player.getName(); | ||
final String nickName = plugin.esb.getNickname(playerName); | ||
FUtil.adminAction(sender.getName(), "Cleaning " + player.getName() + "'s nickname", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be broadcasted to all players?
Doing this differently. The way I'm doing this is you can optionally specify a specific player, but it defaults to it's original clean all nicknames. |
https://totalfreedom.boards.net/thread/66931/nickclean-1-person per this suggestion, an option to switch /nickclean to /nickclean <player | -a>
sorry i've never done this before and i already went in game and tested it, works.