AutoReferee

AutoReferee

9.1k Downloads

Allow Players to Invite Others to Matches

authorblues opened this issue ยท 2 comments

commented

When a player enters a temporary world, there is currently no functionality to invite other players to join you. The current use-case is to use a plugin such as Essentials or CommandBook to teleport the other players to one already in the world. Optimally, there should be a proper invitation system in place with the following features:

  • โœ“ A player in a match world should be able to invite another player on the server before the match begins
  • โœ“ A player should be able to teleport to a match world, possibly with match worlds being able to be password-protected
  • โœ“ An admin should be able to specify a list of players that are "expected" to participate, and those players should be teleported immediately if they are logged on to the server, or should be teleported as soon as they log in.
commented

If you'd teleport a player as soon as they log in, watch out that you don't teleport them when they relog during a game. I think it's best to check the world the player is in and if he's in the right world, don't teleport him.

commented
  • (1) /autoref invite <players...> - Asks the player whether they would like to be teleported to the match word, using Conversation and BooleanPrompt. Response should probably have a timeout so that they aren't locked into a response if they are afk. 90 seconds is probably reasonable for this.
  • (2) /joinmatch <name> - Join the match containing the player, if possible. Might ask for password if world is password-protected. Password should be requested by Conversation to prevent a player accidentally typing the password where everyone could read it, if typed improperly.
  • (2) /leavematch - Provided for balance. Player will be teleported to lobby world if they wish to no longer be in the match world. This may need some checks to ensure this can't be misused somehow.
  • (2) /setaccess <type> [<passwd>] - Players in match can set access type. Type may be private (default, players must be invited), public (players may join with /joinmatch), or protected (requires password to enter).
  • (3) /autoref autoinvite <players...> - Admin may list players to teleport immediately or teleport upon login, as documented above.

Each of these methods should fail if the player is already in a match, including the one they are being invited to.