Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command for use by players to just join a team (and a chat-based GUI) #47

Closed
5 tasks done
Amunak opened this issue Oct 13, 2014 · 4 comments
Closed
5 tasks done

Comments

@Amunak
Copy link
Contributor

Amunak commented Oct 13, 2014

  • /join and /leave
  • Chat-based GUI to select a team:
    • GUI;
    • /join without argument or /uh team chatgui [player] to open the GUI;
    • option to display the GUI to all players without a team when they login (after a configurable delay).

I think it would be nice to have a shortcut command to /uh team join , since it is probably the most used command and it is quite hard to type. Maybe just /team ?

It would be also great if it came in the variant with just (i.e. making default to current player), so it would be /uh team join [player=amunak] and /team [player=amunak] respectively.

Ideally it would also have separate permissions (uh.team would give you full "team management" permissions as it is now and uh.team.self would give you the ability to join a team, but none of the other team commands).

@AmauryCarrade
Copy link
Member

I think it would be nice to have a shortcut command to /uh team join , since it is probably the most used command and it is quite hard to type. Maybe just /team ?

/join?
Good idea. :)

It would be also great if it came in the variant with just (i.e. making default to current player), so it would be /uh team join [player=amunak] and /team [player=amunak] respectively.

This is possible but can lead to conflicts in some cases, because the team name can contain spaces (ex: with a player named the, two teams the team name and team name, if I execute /uh team join the team name with the player name optional...). But it's not a big problem I think.

Ideally it would also have separate permissions (uh.team would give you full "team management" permissions as it is now and uh.team.self would give you the ability to join a team, but none of the other team commands).

I think I'll add permission for each subcommand; with this implemented, the permission would be uh.team.join; I'll add also the permissions uh.team.join.self and uh.team.leave.self.

@Amunak
Copy link
Contributor Author

Amunak commented Oct 13, 2014

team name can contain spaces (ex: with a player named the, two teams the team name and team name, if I execute /uh team join the team name with the player name optional...).

Oh ok. I like to just keep them named as the colors, it is easier to manage that way. There are several non-elegant solutions:

  • make separate commands for the variant with player name and without it
  • allow the use of quotes to enclose the team name if necessary
  • just ignore it and give precedence to checking for a player name; if you have team "Notch Crew" and you want Notch to join it, you have to use /team Notch Notch Crew and not just /team Notch Crew because team Crew doesn't exist.

This is probably so minor issue that you can use the third approach :p

@AmauryCarrade
Copy link
Member

Actually, I currently use the third approach when needed, as example in the /uh tp team command :p .

@AmauryCarrade
Copy link
Member

Related: a command (+API) displaying the teams available to a player; the player just have to click the name of the team to join this team.

With the tellraw-like formatting.

/uh team chatgui [player]

And with an option to display this “chat UI” when a player out of any team joins, after a configurable delay.

@AmauryCarrade AmauryCarrade changed the title Add a command for use by players to just join a team Add a command for use by players to just join a team (and a chat-based GUI) Nov 20, 2014
AmauryCarrade added a commit that referenced this issue Nov 21, 2014
Autocompletion and permissions included.
AmauryCarrade added a commit that referenced this issue Nov 23, 2014
Fixed: unwanted leave-team notification (forgot to commit, oops).

Misc: fixed pom.xml formatting.
AmauryCarrade added a commit that referenced this issue Nov 23, 2014
Fixed: unwanted leave-team notification (forgot to commit, oops).

Misc: fixed pom.xml formatting.
@AmauryCarrade AmauryCarrade removed their assignment Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants