Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Update Command_nickclean.java #202

Closed
wants to merge 2 commits into from
Closed

Conversation

Taahh
Copy link

@Taahh Taahh commented May 27, 2020

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.

@VideoGameSmash12
Copy link

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")
Copy link

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)
Copy link

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);
Copy link

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?

@script-head
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants