Class Group
java.lang.Object
games.stendhal.server.core.rp.group.Group
A group of players
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adds a member to the groupvoid
clean()
removes players that are offline longer than the timeout, destroys the group if there is only one player leftvoid
destory()
destroys the groupsgets the loot modeboolean
hasBeenInvited(String playerName)
check if the player was invitedboolean
is the specified player the leader of this group?boolean
is the player a member of this group?void
invites a player to join this group.boolean
isEmpty()
checks if this group does not have any membersboolean
isFull()
checks if the group is full.boolean
removeMember(String playerName)
removes a member from the groupvoid
sendGroupChangeEvent(Player player)
tells the player the current status of the groupvoid
sendGroupMessage(String name, String text)
sends a group chat message to all membersboolean
is the specified player the leader of this group?void
setLootmode(String mode)
sets the loot mode
-
Constructor Details
-
Group
public Group()
-
-
Method Details
-
addMember
adds a member to the group- Parameters:
playerName
- name of player
-
removeMember
removes a member from the group- Parameters:
playerName
- name of player- Returns:
- true if the player was a member of this group
-
clean
public void clean()removes players that are offline longer than the timeout, destroys the group if there is only one player left -
destory
public void destory()destroys the groups -
isEmpty
public boolean isEmpty()checks if this group does not have any members- Returns:
- true, if it is empty; false if there are members in it
-
isFull
public boolean isFull()checks if the group is full.- Returns:
- true if the group is full; false otherwise
-
hasBeenInvited
check if the player was invited- Parameters:
playerName
- player to check if it was invited- Returns:
- true, if the player was invited; false otherwise
-
hasLeader
is the specified player the leader of this group?- Parameters:
playerName
- name of player- Returns:
- true if its the leader; false otherwise
-
hasMember
is the player a member of this group?- Parameters:
playerName
- name of player- Returns:
- true if the player is a member of this group
-
setLeader
is the specified player the leader of this group?- Parameters:
playerName
- name of player- Returns:
- true if its the leader; false otherwise
-
getLootmode
gets the loot mode- Returns:
- loot mode
-
setLootmode
sets the loot mode- Parameters:
mode
- "single" or "shared"
-
invite
invites a player to join this group.- Parameters:
player
- player sending the invitedtargetPlayer
- invited player
-
sendGroupMessage
sends a group chat message to all members- Parameters:
name
- name of sendertext
- message to send
-
sendGroupChangeEvent
tells the player the current status of the group- Parameters:
player
- Player
-