Class TeamManager


@Entity public class TeamManager extends BasePlayerDataManager
  • Constructor Details

    • TeamManager

      public TeamManager()
    • TeamManager

      public TeamManager(Player player)
  • Method Details

    • getWorld

      public World getWorld()
    • getTeamId

      public int getTeamId(TeamInfo team)
      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

      public TeamInfo getCurrentTeamInfo()
    • getCurrentSinglePlayerTeamInfo

      public TeamInfo getCurrentSinglePlayerTeamInfo()
    • getActiveTeam

      public List<EntityAvatar> getActiveTeam()
    • getCurrentAvatarEntity

      public EntityAvatar getCurrentAvatarEntity()
    • isSpawned

      public boolean isSpawned()
    • getMaxTeamSize

      public int getMaxTeamSize()
    • canAddAvatarsToTeam

      public boolean canAddAvatarsToTeam(TeamInfo team, int avatars)
      Returns true if there is space to add the number of avatars to the team.
    • canAddAvatarToTeam

      public boolean canAddAvatarToTeam(TeamInfo team)
      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

      public boolean addAvatarsToTeam(TeamInfo team, Collection<Avatar> avatars)
      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

      public boolean addAvatarToTeam(TeamInfo team, Avatar avatar)
      Try to add an avatar to a team. Returns true if successful.
    • addAvatarsToCurrentTeam

      public boolean addAvatarsToCurrentTeam(Collection<Avatar> avatars)
      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

      public boolean addAvatarToCurrentTeam(Avatar avatar)
      Try to add an avatar to the current team. Will not modify a temporary team. Returns true if successful.
    • updateTeamEntities

      public void updateTeamEntities(BasePacket responsePacket)
    • setupAvatarTeam

      public void setupAvatarTeam(int teamId, List<Long> list)
    • setupMpTeam

      public void setupMpTeam(List<Long> list)
    • setupTemporaryTeam

      public void setupTemporaryTeam(List<List<Long>> guidList)
    • useTemporaryTeam

      public void useTemporaryTeam(int index)
    • cleanTemporaryTeam

      public void cleanTemporaryTeam()
    • setCurrentTeam

      public void setCurrentTeam(int teamId)
    • setTeamName

      public void setTeamName(int teamId, String teamName)
    • changeAvatar

      public void changeAvatar(long guid)
    • onAvatarDie

      public void onAvatarDie(long dieGuid)
    • reviveAvatar

      public boolean reviveAvatar(Avatar avatar)
    • healAvatar

      public boolean healAvatar(Avatar avatar, int healRate, int healAmount)
    • respawnTeam

      public void respawnTeam()
    • getRespawnPosition

      public Position getRespawnPosition()
    • saveAvatars

      public void saveAvatars()
    • onPlayerLogin

      public void onPlayerLogin()
    • addNewCustomTeam

      public void addNewCustomTeam()
    • removeCustomTeam

      public void removeCustomTeam(int id)
    • getTeams

      public LinkedHashMap<Integer,TeamInfo> getTeams()
    • getCurrentCharacterIndex

      public int getCurrentCharacterIndex()
    • setCurrentCharacterIndex

      public void setCurrentCharacterIndex(int currentCharacterIndex)
    • getMpTeam

      public TeamInfo getMpTeam()
    • setMpTeam

      public void setMpTeam(TeamInfo mpTeam)
    • getEntityId

      public int getEntityId()
    • setEntityId

      public void setEntityId(int entityId)
    • getGadgets

      public Set<EntityBaseGadget> getGadgets()
    • getTeamResonances

      public it.unimi.dsi.fastutil.ints.IntSet getTeamResonances()
    • getTeamResonancesConfig

      public it.unimi.dsi.fastutil.ints.IntSet getTeamResonancesConfig()