public static class VoicePlugin.VoiceConManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.locks.Lock |
lock |
Constructor and Description |
---|
VoiceConManager() |
Modifier and Type | Method and Description |
---|---|
void |
addGroup(OID groupOid,
VoiceGroup group)
Add a mapping from groupOid to group
|
java.util.List<GroupMember> |
getAllPositionalGroupMembers()
Get a list of all GroupMembers that are members of some
PositionalVoiceGroup.
|
VoiceGroup |
getGroup(OID groupOid)
Get the group for the given groupOid.
|
VoiceConnection |
getPlayerCon(OID playerOid)
Get the VoiceConnection object for the player with the
given oid.
|
int |
getPlayerCount() |
VoiceGroup |
getPlayerGroup(OID playerOid)
Get the group associated with the playerOid.
|
PositionalGroupMember |
getPositionalMember(OID playerOid)
If the player with the given oid is in a positional group,
return its PositionalGroupMember; else return null.
|
java.util.List<OID> |
groupPlayers(OID groupOid)
Get a list of the players in a group.
|
boolean |
maybeAddToGroupInstances(OID instanceOid,
PositionalVoiceGroup group)
If the group is not yet in the set of groups associated
with the instanceOid, add it.
|
java.util.Set<PositionalVoiceGroup> |
removeInstance(OID instanceOid)
Remove the mapping from the instanceOid to the set of
PositionalVoiceGroups, and return that set.
|
void |
removePlayer(OID playerOid)
Remove a player from all ConnecitonManager maps.
|
void |
setPlayerCon(OID playerOid,
VoiceConnection con)
Create the mapping from playerOid to its VoiceConnection
object.
|
void |
setPlayerGroup(OID playerOid,
VoiceGroup group)
Create the mapping from the playerOid to the VoiceGroup
that contains the player.
|
public void addGroup(OID groupOid, VoiceGroup group)
groupOid
- The oid of the group.group
- The group for which the mapping should be
added.public java.util.List<OID> groupPlayers(OID groupOid)
groupOid
- The oid of the group.public VoiceGroup getGroup(OID groupOid)
groupOid
- The oid of the group to be returned.public void removePlayer(OID playerOid)
playerOid
- The oid of the player to be removed.public VoiceConnection getPlayerCon(OID playerOid)
playerOid
- The oid of the player whose
VoiceConnection should be returned.public void setPlayerCon(OID playerOid, VoiceConnection con)
playerOid
- The oid of the player for which the
mapping should be created.con
- The VoiceConnection to be associated with the
playerOid.public void setPlayerGroup(OID playerOid, VoiceGroup group)
playerOid
- The oid of the player contained in the
VoiceGroup.group
- The group to be associated with the playerOid.public VoiceGroup getPlayerGroup(OID playerOid)
playerOid
- The oid of the player whose VoiceGroup
should be returned.public PositionalGroupMember getPositionalMember(OID playerOid)
playerOid
- The oid of the player whose member should
be returned.public java.util.List<GroupMember> getAllPositionalGroupMembers()
public boolean maybeAddToGroupInstances(OID instanceOid, PositionalVoiceGroup group)
instanceOid
- The oid of the instance to which the
group should be added.group
- The group to be added to the list of groups
associated with this instanceOid.public java.util.Set<PositionalVoiceGroup> removeInstance(OID instanceOid)
instanceOid
- The oid of the instance whose mapping
should be removed.public int getPlayerCount()