com.electrotank.electroserver4.extensions.api.value
Class RoomConfiguration

java.lang.Object
  extended by com.electrotank.electroserver4.extensions.api.value.RoomConfiguration
All Implemented Interfaces:
Cloneable

public class RoomConfiguration
extends Object
implements Cloneable

Object class that holds the configuration of a single room.

See Also:
GameConfiguration, ZoneConfiguration, ElectroServerApi.createRoom, ElectroServerApi.createRoomInNamedZone, ElectroServer 4 Manual, Creating a Room, ElectroServer 4 Manual, Language Filter, ElectroServer 4 Manual, Flooding Filter

Constructor Summary
RoomConfiguration()
          Constructs a new instance of RoomConfiguration.
 
Method Summary
 void addPlugin(ExtensionComponentConfiguration plugin)
          Adds a plug-in to the list of plug-ins for the room.
 RoomConfiguration clone()
          Constructs a clone of the RoomConfiguration object.
 int getCapacity()
          Gets the capacity of the room.
 String getDescription()
          Gets a description of the room.
 int getFloodingFilterBanDuration()
          Gets the amount of time in seconds to ban a user for a flooding filter violation.
 int getFloodingFilterFailuresBeforeKick()
          Gets the total number of flooding filter failures allowed by a user before that user is kicked from the room.
 int getFloodingFilterKicksBeforeBan()
          Gets the total number of times to kick a user for flooding violations before that user is banned.
 String getFloodingFilterName()
          Gets the name of the flooding filter.
 int getLanguageFilterBanDuration()
          Gets the duration of the ban that the language filter will impose.
 int getLanguageFilterFailuresBeforeKick()
          Gets the number of times the user is allowed to send messages that fail the language filter, before he is kicked from the room.
 int getLanguageFilterKicksBeforeBan()
          Gets the number of times the user can be kicked due to language filter failures before he is disconnected from the server and banned from returning.
 String getLanguageFilterName()
          Gets the name of the room's language filter.
 String getName()
          Gets the name of the room.
 String getPassword()
          Gets the password for the room.
 List<ExtensionComponentConfiguration> getPlugins()
          Gets a list of the plug-ins for the room.
 boolean isFloodingFilterResetAfterKick()
          Is the flooding filter reset after a kick? If set to true, then the user’s offenses are erased and reset after kicking, so the user would never get banned automatically.
 boolean isFloodingFilterSpecified()
          Is a specified flooding filter for this room?
 boolean isHidden()
          Is this room hidden? If a room is hidden, it will not show in the list of rooms that can be entered.
 boolean isLanguageFilterDeliverMessageOnFailure()
          If a message fails the language filter, will it be delivered anyway?
 boolean isLanguageFilterResetAfterKick()
          Should the language filter reset after a kick? If this is set to yes, then every time the user is kicked, it resets the process as if the user never been kicked.
 boolean isLanguageFilterSpecified()
          Is there a specified language filter for this room?
 boolean isNonOperatorUpdateAllowed()
          Is a user who is not an operator allowed to update the room?
 boolean isNonOperatorVariableUpdateAllowed()
          Is a user who is not an operator allowed to update room variables?
 boolean isPersistent()
          Is this room persistent? If a room is persistent, it will not be deleted when the last person leaves it.
 boolean isUsingFloodingFilter()
          Does this room use a flooding filter?
 boolean isUsingLanguageFilter()
          Does this room use a language filter?
 void setCapacity(int capacity)
          Sets the capacity of the room.
 void setDescription(String description)
          Sets the description of the room.
 void setFloodingFilterBanDuration(int floodingFilterBanDuration)
          Sets the amount of time in seconds to ban a user for a flooding filter violation.
 void setFloodingFilterFailuresBeforeKick(int floodingFilterFailuresBeforeKick)
          Sets the total number of flooding filter failures allowed by a user before that user is kicked from the room.
 void setFloodingFilterKicksBeforeBan(int floodingFilterKicksBeforeBan)
          Sets the total number of times to kick a user for flooding violations before that user is banned.
 void setFloodingFilterName(String floodingFilterName)
          Sets the name of the flooding filter.
 void setFloodingFilterResetAfterKick(boolean floodingFilterResetAfterKick)
          Sets a boolean indicating whether the flooding filter will be reset after a kick.
 void setFloodingFilterSpecified(boolean floodingFilterSpecified)
          Sets whether a flooding filter has been specified for this room.
 void setHidden(boolean hidden)
          Sets the room to hidden or not.
 void setHidden(String hiddenString)
          Sets the room to hidden or not.
 void setLanguageFilterBanDuration(int banDuration)
          Sets the number of seconds that a user will be banned if the language filter ban is triggered.
 void setLanguageFilterDeliverMessageOnFailure(boolean deliverMessageOnFailure)
          Sets whether a message that fails the language filter will be delivered anyway.
 void setLanguageFilterFailuresBeforeKick(int failuresBeforeKick)
          Sets the number of times the user is allowed to send messages that fail the language filter, before he is kicked from the room.
 void setLanguageFilterKicksBeforeBan(int kicksBeforeBan)
          Sets the number of times the user can be kicked due to language filter failures before he is disconnected from the server and banned from returning.
 void setLanguageFilterName(String languageFilterName)
          Sets the name of the room's language filter.
 void setLanguageFilterResetAfterKick(boolean resetAfterKick)
          Sets whether the language filter should reset after a kick? If this is set to yes, then every time the user is kicked, it resets the process as if the user never been kicked.
 void setLanguageFilterSpecified(boolean roomFilterSpecified)
          Sets whether there is a specified language filter for this room.
 void setName(String name)
          Sets the name of the room.
 void setNonOperatorUpdateAllowed(boolean nonOperatorUpdateAllowed)
          Sets whether a user who is a non-operator is allowed to update the room.
 void setNonOperatorVariableUpdateAllowed(boolean nonOperatorVariableUpdateAllowed)
          Sets whether a user who is not an operator is allowed to update room variables?
 void setPassword(String password)
          Sets the password for the room.
 void setPersistent(boolean persistent)
          Sets the room to be persistent or not.
 void setUsingFloodingFilter(boolean useFloodingFilter)
          Sets whether this room uses a flooding filter.
 void setUsingLanguageFilter(boolean useLanguageFilter)
          Sets whether this room uses a language filter.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoomConfiguration

public RoomConfiguration()
Constructs a new instance of RoomConfiguration.

Method Detail

clone

public final RoomConfiguration clone()
Constructs a clone of the RoomConfiguration object.

Overrides:
clone in class Object
Returns:
clone

getCapacity

public int getCapacity()
Gets the capacity of the room. That is, the maximum number of users allowed in the room.

Returns:
capacity

setCapacity

public void setCapacity(int capacity)
Sets the capacity of the room.

Parameters:
capacity - number of users allowed in the room

isHidden

public boolean isHidden()
Is this room hidden? If a room is hidden, it will not show in the list of rooms that can be entered. This includes lists of games from the GameManager.

Returns:
a boolean indicating whether the room is hidden

setHidden

public void setHidden(String hiddenString)
Sets the room to hidden or not. If a room is hidden, it will not show in the list of rooms that can be entered. This includes lists of games from the GameManager.

Parameters:
hiddenString - "true" to set the room to hidden

setHidden

public void setHidden(boolean hidden)
Sets the room to hidden or not. If a room is hidden, it will not show in the list of rooms that can be entered. This includes lists of games from the GameManager.

Parameters:
hidden - true to set the room to hidden

getName

public String getName()
Gets the name of the room.

Returns:
name

setName

public void setName(String name)
Sets the name of the room.

Parameters:
name - name of the room

getPassword

public String getPassword()
Gets the password for the room.

Returns:
password

setPassword

public void setPassword(String password)
Sets the password for the room.

Parameters:
password - password for the room

getPlugins

public List<ExtensionComponentConfiguration> getPlugins()
Gets a list of the plug-ins for the room.

Returns:
list of plug-ins

addPlugin

public void addPlugin(ExtensionComponentConfiguration plugin)
Adds a plug-in to the list of plug-ins for the room.

Parameters:
plugin - plug-in to be added

isPersistent

public boolean isPersistent()
Is this room persistent? If a room is persistent, it will not be deleted when the last person leaves it.

Returns:
boolean indicating whether the room is persistent

setPersistent

public void setPersistent(boolean persistent)
Sets the room to be persistent or not. If a room is persistent, it will not be deleted when the last person leaves it.

Parameters:
persistent - boolean indicating whether the room is persistent

getDescription

public String getDescription()
Gets a description of the room.

Returns:
description

setDescription

public void setDescription(String description)
Sets the description of the room.

Parameters:
description - description of the room

isNonOperatorUpdateAllowed

public boolean isNonOperatorUpdateAllowed()
Is a user who is not an operator allowed to update the room?

Returns:
boolean indicating whether a non-operator is allowed to update the room

setNonOperatorUpdateAllowed

public void setNonOperatorUpdateAllowed(boolean nonOperatorUpdateAllowed)
Sets whether a user who is a non-operator is allowed to update the room.

Parameters:
nonOperatorUpdateAllowed - boolean indicating whether a non-operator is allowed to update the room

isNonOperatorVariableUpdateAllowed

public boolean isNonOperatorVariableUpdateAllowed()
Is a user who is not an operator allowed to update room variables?

Returns:
boolean indicating whether a non-operator is allowed to update the room variables

setNonOperatorVariableUpdateAllowed

public void setNonOperatorVariableUpdateAllowed(boolean nonOperatorVariableUpdateAllowed)
Sets whether a user who is not an operator is allowed to update room variables?

Parameters:
nonOperatorVariableUpdateAllowed - boolean indicating whether a non-operator is allowed to update the room variables

getLanguageFilterBanDuration

public int getLanguageFilterBanDuration()
Gets the duration of the ban that the language filter will impose. This is the amount of time in seconds that a user will be banned if the language filter ban is triggered.

Returns:
duration of the language filter ban

setLanguageFilterBanDuration

public void setLanguageFilterBanDuration(int banDuration)
Sets the number of seconds that a user will be banned if the language filter ban is triggered.

Parameters:
banDuration - duration of the language filter ban

isLanguageFilterDeliverMessageOnFailure

public boolean isLanguageFilterDeliverMessageOnFailure()
If a message fails the language filter, will it be delivered anyway?

Returns:
boolean indicating whether a message that fails the language filter will be delivered anyway

setLanguageFilterDeliverMessageOnFailure

public void setLanguageFilterDeliverMessageOnFailure(boolean deliverMessageOnFailure)
Sets whether a message that fails the language filter will be delivered anyway.

Parameters:
deliverMessageOnFailure - boolean indicating whether a message that fails the language filter will be delivered anyway

getLanguageFilterKicksBeforeBan

public int getLanguageFilterKicksBeforeBan()
Gets the number of times the user can be kicked due to language filter failures before he is disconnected from the server and banned from returning.

Returns:
number of language filter kicks before banning

setLanguageFilterKicksBeforeBan

public void setLanguageFilterKicksBeforeBan(int kicksBeforeBan)
Sets the number of times the user can be kicked due to language filter failures before he is disconnected from the server and banned from returning.

Parameters:
kicksBeforeBan - number of language filter kicks before banning

getLanguageFilterFailuresBeforeKick

public int getLanguageFilterFailuresBeforeKick()
Gets the number of times the user is allowed to send messages that fail the language filter, before he is kicked from the room.

Returns:
number of language filter failures before kick

setLanguageFilterFailuresBeforeKick

public void setLanguageFilterFailuresBeforeKick(int failuresBeforeKick)
Sets the number of times the user is allowed to send messages that fail the language filter, before he is kicked from the room.

Parameters:
failuresBeforeKick - number of language filter failures before kick

getLanguageFilterName

public String getLanguageFilterName()
Gets the name of the room's language filter.

Returns:
name of language filter

setLanguageFilterName

public void setLanguageFilterName(String languageFilterName)
Sets the name of the room's language filter.

Parameters:
languageFilterName - name of the language filter

isLanguageFilterSpecified

public boolean isLanguageFilterSpecified()
Is there a specified language filter for this room?

Returns:
boolean indicating whether there is a specified language filter for this room

setLanguageFilterSpecified

public void setLanguageFilterSpecified(boolean roomFilterSpecified)
Sets whether there is a specified language filter for this room.

Parameters:
roomFilterSpecified - boolean indicating whether there is a specified language filter for this room

isLanguageFilterResetAfterKick

public boolean isLanguageFilterResetAfterKick()
Should the language filter reset after a kick? If this is set to yes, then every time the user is kicked, it resets the process as if the user never been kicked.

Returns:
boolean indicating whether to reset the language filter after a kick

setLanguageFilterResetAfterKick

public void setLanguageFilterResetAfterKick(boolean resetAfterKick)
Sets whether the language filter should reset after a kick? If this is set to yes, then every time the user is kicked, it resets the process as if the user never been kicked.

Parameters:
resetAfterKick - boolean indicating whether to reset the language filter after a kick

getFloodingFilterBanDuration

public int getFloodingFilterBanDuration()
Gets the amount of time in seconds to ban a user for a flooding filter violation. If set to -1, then the user is banned until a server reboot.

Returns:
number of seconds to ban a user for flooding

setFloodingFilterBanDuration

public void setFloodingFilterBanDuration(int floodingFilterBanDuration)
Sets the amount of time in seconds to ban a user for a flooding filter violation. If set to -1, then the user is banned until a server reboot.

Parameters:
floodingFilterBanDuration - number of seconds to ban a user for flooding

getFloodingFilterFailuresBeforeKick

public int getFloodingFilterFailuresBeforeKick()
Gets the total number of flooding filter failures allowed by a user before that user is kicked from the room.

Returns:
number of flooding filter failures before kick

setFloodingFilterFailuresBeforeKick

public void setFloodingFilterFailuresBeforeKick(int floodingFilterFailuresBeforeKick)
Sets the total number of flooding filter failures allowed by a user before that user is kicked from the room.

Parameters:
floodingFilterFailuresBeforeKick - number of flooding filter failures before kick

getFloodingFilterKicksBeforeBan

public int getFloodingFilterKicksBeforeBan()
Gets the total number of times to kick a user for flooding violations before that user is banned.

Returns:
number of flooding filter kicks before ban

setFloodingFilterKicksBeforeBan

public void setFloodingFilterKicksBeforeBan(int floodingFilterKicksBeforeBan)
Sets the total number of times to kick a user for flooding violations before that user is banned.

Parameters:
floodingFilterKicksBeforeBan - number of flooding filter kicks before ban

getFloodingFilterName

public String getFloodingFilterName()
Gets the name of the flooding filter.

Returns:
flooding filter name

setFloodingFilterName

public void setFloodingFilterName(String floodingFilterName)
Sets the name of the flooding filter.

Parameters:
floodingFilterName - flooding filter name

isFloodingFilterResetAfterKick

public boolean isFloodingFilterResetAfterKick()
Is the flooding filter reset after a kick? If set to true, then the user’s offenses are erased and reset after kicking, so the user would never get banned automatically. If set to false then number of times the user has been kicked is stored and may eventually lead to a ban (depending on the ban settings).

Returns:
boolean indicating whether the flooding filter is reset after a kick

setFloodingFilterResetAfterKick

public void setFloodingFilterResetAfterKick(boolean floodingFilterResetAfterKick)
Sets a boolean indicating whether the flooding filter will be reset after a kick. If set to true, then the user’s offenses are erased and reset after kicking, so the user would never get banned automatically. If set to false then number of times the user has been kicked is stored and may eventually lead to a ban (depending on the ban settings).

Parameters:
floodingFilterResetAfterKick - boolean indicating whether the flooding filter will be reset after a kick

isUsingFloodingFilter

public boolean isUsingFloodingFilter()
Does this room use a flooding filter?

Returns:
boolean indicating whether a flooding filter is used

setUsingFloodingFilter

public void setUsingFloodingFilter(boolean useFloodingFilter)
Sets whether this room uses a flooding filter.

Parameters:
useFloodingFilter - boolean indicating whether a flooding filter is used

isUsingLanguageFilter

public boolean isUsingLanguageFilter()
Does this room use a language filter?

Returns:
boolean indicating whether a language filter is used

setUsingLanguageFilter

public void setUsingLanguageFilter(boolean useLanguageFilter)
Sets whether this room uses a language filter.

Parameters:
useLanguageFilter - boolean indicating whether a language filter is used

isFloodingFilterSpecified

public boolean isFloodingFilterSpecified()
Is a specified flooding filter for this room?

Returns:
boolean indicating whether a flooding filter has been specified

setFloodingFilterSpecified

public void setFloodingFilterSpecified(boolean floodingFilterSpecified)
Sets whether a flooding filter has been specified for this room.

Parameters:
floodingFilterSpecified - boolean indicating whether a flooding filter has been specified


Copyright © 2007 Electrotank, Inc. All Rights Reserved.