Class Group
java.lang.Object
games.stendhal.server.core.rp.group.Group
A group of players
- Author:
- hendrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadds a member to the groupvoidclean()removes players that are offline longer than the timeout, destroys the group if there is only one player leftvoiddestory()destroys the groupsgets the loot modebooleanhasBeenInvited(String playerName) check if the player was invitedbooleanis the specified player the leader of this group?booleanis the player a member of this group?voidinvites a player to join this group.booleanisEmpty()checks if this group does not have any membersbooleanisFull()checks if the group is full.booleanremoveMember(String playerName) removes a member from the groupvoidsendGroupChangeEvent(Player player) tells the player the current status of the groupvoidsendGroupMessage(String name, String text) sends a group chat message to all membersbooleanis the specified player the leader of this group?voidsetLootmode(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
-