Class Guild
Object
Guild
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddGuildrank(Guildrank rank) Adds a guildrank.booleandeleteGuildrank(Guildrank rank) Deletes a guildrank.booleangetActiveMember(String name) Searches and returns the person by name in this guild, or null if not found.All members of the guild actively playing the game as of this moment.Returns a description in case the guild is in danger of being purged from the database.getBody()This is primarily used for displaying the current status of the guild to a member of the guild.getBoss()Returns the guildmaster of this guild.Indicates the colour of the guild chat.getImage()Returns an url pointing to an image.The title as visible on the screen.Searches and returns the person by name in this guild, or null if not found.getName()The name of the guild, is also the primary key.getOwner()Retrieves the owner, the administrator, of this object.getRank(int id) Returns the rank based on the rank id/guildlevel.getTitle()inthashCode()voidvoidsetActiveMembers(SortedSet<User> personCollection) voidSets the guildmaster of this guild.voidvoidsetCreation(LocalDateTime creation) voidsetDaysguilddeath(Integer daysguilddeath) voidsetDescription(String guilddescription) voidsetGuildrankCollection(SortedSet<Guildrank> guildrankCollection) voidsetHomepage(String guildurl) voidSets an url pointing to an image.voidsetLogonmessage(String logonmessage) voidsetMaxguilddeath(Integer maxguilddeath) voidsetMembers(SortedSet<User> personCollection) voidsetMinguildlevel(Integer minguildlevel) voidsetMinguildmembers(Integer minguildmembers) voidvoidSets the owner, the administrator, of this object.voidtoString()
-
Field Details
-
DEFAULT_GUILDMESSAGE_COLOUR
- See Also:
-
-
Constructor Details
-
Guild
public Guild() -
Guild
-
Guild
-
-
Method Details
-
getName
The name of the guild, is also the primary key.- Returns:
- the name of the guild.
- See Also:
-
setName
-
getTitle
-
getMainTitle
Description copied from interface:DisplayInterfaceThe title as visible on the screen.- Specified by:
getMainTitlein interfaceDisplayInterface- Returns:
-
setTitle
-
getDaysguilddeath
-
setDaysguilddeath
-
getMaxguilddeath
-
setMaxguilddeath
-
getMinguildmembers
-
setMinguildmembers
-
getMinguildlevel
-
setMinguildlevel
-
getDescription
-
setDescription
-
getHomepage
-
setHomepage
-
getActive
-
setActive
-
getCreation
-
setCreation
-
getLogonmessage
-
setLogonmessage
-
getMembers
-
getActiveMembers
-
setMembers
-
setActiveMembers
-
getOwner
-
setOwner
Description copied from interface:OwnageSets the owner, the administrator, of this object. -
getBoss
Returns the guildmaster of this guild.- Returns:
- a Person, the guildmaster. Should not be null, ...ever.
-
setBoss
Sets the guildmaster of this guild.- Parameters:
boss- the new guildmaster. Should never be null.- Throws:
MudException- if new guildmaster is null, or not a member of this guild.
-
getGuildrankCollection
-
setGuildrankCollection
-
getColour
Indicates the colour of the guild chat. The default is green.- Returns:
- String indicating either a hexadecimal value (for example #FFFFFF) or the name of a colour (for example Blue).
-
setColour
- Parameters:
colour-- See Also:
-
hashCode
-
equals
-
toString
-
getAlarmDescription
Returns a description in case the guild is in danger of being purged from the database. This is necessary to make sure there is not a plethora of guilds with few members.The following preconditions are in effect:
- the guild is active
- there are too few guildmembers (minguildmembers > amountofmembers)
- Returns:
- String indicating if there are too few members, usually should be the empty string if all is well.
-
getMember
-
getActiveMember
-
getImage
Description copied from interface:DisplayInterfaceReturns an url pointing to an image.- Specified by:
getImagein interfaceDisplayInterface- Returns:
-
setImage
-
getRank
Returns the rank based on the rank id/guildlevel. In case the rank id does not exist, null will be returned.- Parameters:
id- the id of the rank/guildlevel- Returns:
- the rank in the guild
-
getBody
This is primarily used for displaying the current status of the guild to a member of the guild.- Specified by:
getBodyin interfaceDisplayInterface- Returns:
- a string containing the description of the guild.
- Throws:
MudException
-
addGuildrank
Adds a guildrank.- Parameters:
rank- the rank to add- Returns:
- true if this set did not already contain the specified element
-
deleteGuildrank
Deletes a guildrank.- Parameters:
rank- the rank to delete- Returns:
- true if this set contained the specified element
-