Class JoinRoomInvitationRequest

java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.invitation.JoinRoomInvitationRequest
All Implemented Interfaces:
sfs3.client.requests.IClientRequest

public class JoinRoomInvitationRequest extends BaseRequest
  • Constructor Details

    • JoinRoomInvitationRequest

      public JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames)
      Sends an invitation to other users/players to join a specific Room.

      Invited users receive the invitation as an invitation event dispatched to their clients: they can accept or refuse it by means of the InvitationReplyRequest request, which must be sent within the specified amount of time.

      Depending on the Room's settings the invitation can be sent by the Room's owner only or by any other user. This behavior can be set via the RoomSettings.allowOwnerOnlyInvitation parameter.

      NOTE: spectators in a Game Room are not allowed to invite other users; only players are.

      An invitation can also specify the amount of time given to each invitee to reply. Default is 30 seconds. A positive answer will attempt to join the user in the designated Room. For Game Rooms the asSpectator flag can be toggled to join the invitee as player or spectator (default = player).

      There aren't any specific notifications sent back to the inviter after the invitee's response. Users that have accepted the invitation will join the Room while those who didn't reply or turned down the invitation won't generate any event. In order to send specific messages (e.g. chat), just send a private message back to the inviter.

      The following example invites two more users in the current game:

      Since:
      1.7.0
      See Also:
    • JoinRoomInvitationRequest

      public JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds)
    • JoinRoomInvitationRequest

      public JoinRoomInvitationRequest(Room targetRoom, List<String> invitedUserNames, ISFSObject params, int expirySeconds, boolean asSpectator)
  • Method Details