Class BanUsersFromRoomRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
You can ban a single User or a group of Users (max 10), providing a time interval after which they will be able to return to the Room.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class sfs3.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BanUsersFromRoom, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, ClusterInviteUsers, ClusterJoinOrCreate, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GameServerConnectionRequired, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, JoinRoomInvite, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, QuickJoinOrCreateRoom, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserPosition, SetUserVariables, sfso, SpectatorToPlayer, SubscribeRoomGroup, targetController, UdpInit, UnbanUsersFromRoom, UnsubscribeRoomGroup -
Constructor Summary
ConstructorsConstructorDescriptionBanUsersFromRoomRequest(List<User> users, Room theRoom, String message) Bans a group of Users from the Room for 1 hour.BanUsersFromRoomRequest(List<User> users, Room theRoom, String message, int timeInterval, TimeUnit timeUnit) Ban up to 10 users for up to 24 hours.BanUsersFromRoomRequest(User user, Room theRoom, String message) Bans a User from the Room for 1 hour.BanUsersFromRoomRequest(User user, Room theRoom, String message, int timeInterval, TimeUnit timeUnit) Ban a User for up to 24 hours. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_USERS
- See Also:
- Internal
-
KEY_ROOM
- See Also:
-
KEY_INTERVAL
- See Also:
-
KEY_TIME_UNIT
- See Also:
-
KEY_MESSAGE
- See Also:
-
-
Constructor Details
-
BanUsersFromRoomRequest
Bans a User from the Room for 1 hour. To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges.NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).
- Parameters:
user- the UsertheRoom- the Room where the User should be bannedmessage- an optional ban message
-
BanUsersFromRoomRequest
Bans a group of Users from the Room for 1 hour. To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privilegesNOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).
- Parameters:
users- a list of Users (max 10)theRoom- the Room where the User should be bannedmessage- an optional ban message
-
BanUsersFromRoomRequest
public BanUsersFromRoomRequest(User user, Room theRoom, String message, int timeInterval, TimeUnit timeUnit) Ban a User for up to 24 hours. Ban time can be expressed in minutes (1..60) or hours(1..24). An optional moderator message can be sent to the users just banned.To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges
NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).
- Parameters:
user- The User to bantheRoom- The target Roommessage- (optional) A message for the banned userstimeInterval- the time intervaltimeUnit- the unit of time (minutes or hours)
-
BanUsersFromRoomRequest
public BanUsersFromRoomRequest(List<User> users, Room theRoom, String message, int timeInterval, TimeUnit timeUnit) Ban up to 10 users for up to 24 hours. Ban time can be expressed in minutes (1..60) or hours(1..24). An optional moderator message can be sent to the users just banned.To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges
NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).
- Parameters:
users- A list of Users (max 10)theRoom- The target Roommessage- (optional) A message for the banned userstimeInterval- the time intervaltimeUnit- the unit of time (minutes or hours)
-
-
Method Details
-
validate
- Throws:
SFSValidationException
-
execute
- Throws:
SFSException
-