Skip to content

Implement nicknames#19

Open
mdcfe wants to merge 3 commits into
Crypnotic:masterfrom
N3FS:feature/nickname-command
Open

Implement nicknames#19
mdcfe wants to merge 3 commits into
Crypnotic:masterfrom
N3FS:feature/nickname-command

Conversation

@mdcfe
Copy link
Copy Markdown
Contributor

@mdcfe mdcfe commented May 29, 2019

Add nicknames. Players can set their own using /nickname set <nickname>, check theirs using /nickname get and clear theirs with /nickname clear. Their nickname is used as their display name where appropriate.

I'm not convinced about the command syntax - should this be split into separate commands? In addition, this PR currently doesn't provide a way to see/check/clear other people's nicknames (which would be useful for moderators etc.).

mdcfe added 2 commits May 29, 2019 20:52
I'm not convinced about the command syntax - should this be split into separate commands?
@Crypnotic
Copy link
Copy Markdown
Owner

Crypnotic commented Jun 2, 2019

What about something along the lines of:

/nickname returns the players nickname
/nickname (player) return the target player's nickname
/nickname (player) (clear|set) [nick] which would perform the given action on a target player

@mdcfe
Copy link
Copy Markdown
Contributor Author

mdcfe commented Jun 2, 2019

What about a player setting their own nickname? Would this require them to include their own username to set/clear their nickname? /nickname (clear|set) [nickname] could clash with the (admittedly unlikely) case of trying to read the nickname of a player called clear.

@Crypnotic
Copy link
Copy Markdown
Owner

I don't think it would be the worst thing in the world for a player to have to specify their own username to set their own nickname, but it definitely needs a little more thought. I'm not too keen on having a get subcommand though

@Crypnotic
Copy link
Copy Markdown
Owner

Crypnotic commented Jun 6, 2019

@md678685 So should this PR doing a sweeping change allowing other commands to target players based on their nickname?

@mdcfe
Copy link
Copy Markdown
Contributor Author

mdcfe commented Jun 8, 2019

I suppose so - this can be done in a method on CommandWrapper or UserManager.

@mdcfe
Copy link
Copy Markdown
Contributor Author

mdcfe commented Jun 30, 2019

Looking at other plugins, there are a couple other ways to do this. EssentialsX uses a single command:

  • /nick <nickname> sets your own nickname
  • /nick off clears your own nickname
  • /nick [player] <nickname> sets someone else's nickname
  • /nick [player] off clears someone else's nickname

Nucleus uses two separate commands that share a single permission:

BungeeSuiteChat similarly uses two separate commands for setting and clearing nicknames with a shared permission node.

None of the above provide a command to see your own nickname, though the nicknames can be seen elsewhere such as in chat or command feedback (at least in EssentialsX). We could add a /whois command to look up both what someone's nickname is from their username and what their real username is, removing the need for a "get nickname" command. See below

EssentialsX's command is probably the most familiar to players, but it isn't as clear as separate commands.

I'd be happy to update this PR to use either separate commands or an EssentialsX-like /nick, or keep it as-is depending on what you'd prefer.


Edit: where exactly should we handle looking up players by nickname in commands?

Edit 2: I just realised /info serves the purpose of /whois, but we could add a /realname command like EssentialsX's /realname.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants