Package emu.grasscutter.game.player
Class TeamManager
java.lang.Object
emu.grasscutter.game.player.BasePlayerDataManager
emu.grasscutter.game.player.TeamManager
-
Field Summary
Fields inherited from class emu.grasscutter.game.player.BasePlayerDataManager
player -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAvatarsToCurrentTeam(Collection<Avatar> avatars) Try to add the collection of avatars to the current team.booleanaddAvatarsToTeam(TeamInfo team, Collection<Avatar> avatars) Try to add the collection of avatars to the team.booleanaddAvatarToCurrentTeam(Avatar avatar) Try to add an avatar to the current team.booleanaddAvatarToTeam(TeamInfo team, Avatar avatar) Try to add an avatar to a team.voidbooleancanAddAvatarsToCurrentTeam(int avatars) Returns true if there is space to add the number of avatars to the current team.booleancanAddAvatarsToTeam(TeamInfo team, int avatars) Returns true if there is space to add the number of avatars to the team.booleanReturns true if there is space to add to the current team.booleancanAddAvatarToTeam(TeamInfo team) Returns true if there is space to add to the team.voidchangeAvatar(long guid) voidlongintintintintintSearch through all teams and if the team matches, return that index.it.unimi.dsi.fastutil.ints.IntSetit.unimi.dsi.fastutil.ints.IntSetgetTeams()getWorld()booleanhealAvatar(Avatar avatar, int healRate, int healAmount) booleanvoidonAvatarDie(long dieGuid) voidvoidremoveCustomTeam(int id) voidbooleanreviveAvatar(Avatar avatar) voidvoidsetCurrentCharacterIndex(int currentCharacterIndex) voidsetCurrentTeam(int teamId) voidsetEntityId(int entityId) voidvoidsetTeamName(int teamId, String teamName) voidsetupAvatarTeam(int teamId, List<Long> list) voidsetupMpTeam(List<Long> list) voidsetupTemporaryTeam(List<List<Long>> guidList) voidupdateTeamEntities(BasePacket responsePacket) voiduseTemporaryTeam(int index) Methods inherited from class emu.grasscutter.game.player.BasePlayerDataManager
getPlayer, setPlayer
-
Constructor Details
-
TeamManager
public TeamManager() -
TeamManager
-
-
Method Details
-
getWorld
-
getTeamId
Search through all teams and if the team matches, return that index. Otherwise, return -1. No match could mean that the team does not currently belong to the player. -
getCurrentTeamId
public int getCurrentTeamId() -
getCurrentCharacterGuid
public long getCurrentCharacterGuid() -
getCurrentTeamInfo
-
getCurrentSinglePlayerTeamInfo
-
getActiveTeam
-
getCurrentAvatarEntity
-
isSpawned
public boolean isSpawned() -
getMaxTeamSize
public int getMaxTeamSize() -
canAddAvatarsToTeam
Returns true if there is space to add the number of avatars to the team. -
canAddAvatarToTeam
Returns true if there is space to add to the team. -
canAddAvatarsToCurrentTeam
public boolean canAddAvatarsToCurrentTeam(int avatars) Returns true if there is space to add the number of avatars to the current team. If the current team is temporary, returns false. -
canAddAvatarToCurrentTeam
public boolean canAddAvatarToCurrentTeam()Returns true if there is space to add to the current team. If the current team is temporary, returns false. -
addAvatarsToTeam
Try to add the collection of avatars to the team. Returns true if all were successfully added. If some can not be added, returns false and does not add any. -
addAvatarToTeam
Try to add an avatar to a team. Returns true if successful. -
addAvatarsToCurrentTeam
Try to add the collection of avatars to the current team. Will not modify a temporary team. Returns true if all were successfully added. If some can not be added, returns false and does not add any. -
addAvatarToCurrentTeam
Try to add an avatar to the current team. Will not modify a temporary team. Returns true if successful. -
updateTeamEntities
-
setupAvatarTeam
-
setupMpTeam
-
setupTemporaryTeam
-
useTemporaryTeam
public void useTemporaryTeam(int index) -
cleanTemporaryTeam
public void cleanTemporaryTeam() -
setCurrentTeam
public void setCurrentTeam(int teamId) -
setTeamName
-
changeAvatar
public void changeAvatar(long guid) -
onAvatarDie
public void onAvatarDie(long dieGuid) -
reviveAvatar
-
healAvatar
-
respawnTeam
public void respawnTeam() -
getRespawnPosition
-
saveAvatars
public void saveAvatars() -
onPlayerLogin
public void onPlayerLogin() -
addNewCustomTeam
public void addNewCustomTeam() -
removeCustomTeam
public void removeCustomTeam(int id) -
getTeams
-
getCurrentCharacterIndex
public int getCurrentCharacterIndex() -
setCurrentCharacterIndex
public void setCurrentCharacterIndex(int currentCharacterIndex) -
getMpTeam
-
setMpTeam
-
getEntityId
public int getEntityId() -
setEntityId
public void setEntityId(int entityId) -
getGadgets
-
getTeamResonances
public it.unimi.dsi.fastutil.ints.IntSet getTeamResonances() -
getTeamResonancesConfig
public it.unimi.dsi.fastutil.ints.IntSet getTeamResonancesConfig()
-