Package me.neznamy.tab.api.team
Interface TeamManager
- All Known Subinterfaces:
UnlimitedNametagManager
public interface TeamManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidforceTeamName(TabPlayer player, String teamName) Forces new team name for the player until this method is called again with null argument and performs all actions to change player's team namegetCollisionRule(TabPlayer player) Returns forced collision rule or null if collision is not forced using setCollisionRulegetCustomPrefix(TabPlayer player) getCustomSuffix(TabPlayer player) getForcedTeamName(TabPlayer player) Returns forced team name of player or null if not forcedgetOriginalPrefix(TabPlayer player) getOriginalSuffix(TabPlayer player) booleanhasHiddenNametag(TabPlayer player) Return whether player has hidden NameTag or notbooleanhasHiddenNametag(TabPlayer player, TabPlayer viewer) Returns true if NameTag is hidden for specified viewer, false if notbooleanReturnstrueif player has hidden nametags by either callingtoggleNameTagVisibilityView(TabPlayer, boolean)or using a command,falseif not.booleanhasTeamHandlingPaused(TabPlayer player) Returns true if team handling is paused for this player using pauseTeamHandling(), false if not, or it was resumed already using resumeTeamHandlingvoidhideNametag(TabPlayer player) Makes player's NameTag globally invisiblevoidhideNametag(TabPlayer player, TabPlayer viewer) Hides player's NameTag for specified player until it's shown againvoidpauseTeamHandling(TabPlayer player) Unregisters player's team and no longer handles it, as well as disables anti-override for teams.voidresetPrefix(TabPlayer player) voidresetSuffix(TabPlayer player) voidresumeTeamHandling(TabPlayer player) Resumes team handling if it was before paused using pauseTeamHandling(), if not, nothing happensvoidsetCollisionRule(TabPlayer player, Boolean collision) Forces collision rule for the player.voidvoidvoidshowNametag(TabPlayer player) Makes player's NameTag visible againvoidshowNametag(TabPlayer player, TabPlayer viewer) Shows player's NameTag for specified viewer if it was hidden beforevoidtoggleNameTagVisibilityView(TabPlayer player, boolean sendToggleMessage) Toggles nametag visibility view on all players for specified player.voidupdateTeamData(TabPlayer player) Sends update team's properties packet of player's team to everyone
-
Method Details
-
hideNametag
Makes player's NameTag globally invisible- Parameters:
player- player to hide nametag of- See Also:
-
hideNametag
Hides player's NameTag for specified player until it's shown again- Parameters:
player- player to hide nametag ofviewer- player to hide NameTag for
-
showNametag
Makes player's NameTag visible again- Parameters:
player- player to show nametag of- See Also:
-
showNametag
Shows player's NameTag for specified viewer if it was hidden before- Parameters:
player- player to show nametag ofviewer- player to show NameTag back for
-
hasHiddenNametag
Return whether player has hidden NameTag or not- Parameters:
player- player to check nametag visibility status of- Returns:
- Whether player has hidden NameTag or not
- See Also:
-
hasHiddenNametag
Returns true if NameTag is hidden for specified viewer, false if not- Parameters:
player- player to check visibility status ofviewer- player to check visibility status for- Returns:
- true if hidden, false if not
-
pauseTeamHandling
Unregisters player's team and no longer handles it, as well as disables anti-override for teams. This can be resumed using resumeTeamHandling(). If team handling was paused already, nothing happens.- Parameters:
player- player to pause team handling of
-
resumeTeamHandling
Resumes team handling if it was before paused using pauseTeamHandling(), if not, nothing happens- Parameters:
player- player to resume team handling of
-
hasTeamHandlingPaused
Returns true if team handling is paused for this player using pauseTeamHandling(), false if not, or it was resumed already using resumeTeamHandling- Parameters:
player- player to check handling status of- Returns:
- true if paused, false if not
-
forceTeamName
Forces new team name for the player until this method is called again with null argument and performs all actions to change player's team name- Parameters:
player- player to set team name ofteamName- forced team name
-
getForcedTeamName
Returns forced team name of player or null if not forced- Parameters:
player- player to check forced team name of- Returns:
- forced team name of player or null if not forced
-
setCollisionRule
Forces collision rule for the player. Setting it to null will remove forced value- Parameters:
player- player to set collision rule ofcollision- forced collision rule
-
getCollisionRule
Returns forced collision rule or null if collision is not forced using setCollisionRule- Parameters:
player- player to get forced collision of- Returns:
- forced value or null if not forced
-
updateTeamData
Sends update team's properties packet of player's team to everyone- Parameters:
player- player to update team data of
-
setPrefix
-
setSuffix
-
resetPrefix
-
resetSuffix
-
getCustomPrefix
-
getCustomSuffix
-
getOriginalPrefix
-
getOriginalSuffix
-
toggleNameTagVisibilityView
Toggles nametag visibility view on all players for specified player. On first call, nametags of all players will become invisible for specified player. On second call, they will become visible again.- Parameters:
player- player to toggle nametag visibility view forsendToggleMessage-trueif configured toggle message should be sent,falseif not
-
hasHiddenNameTagVisibilityView
Returnstrueif player has hidden nametags by either callingtoggleNameTagVisibilityView(TabPlayer, boolean)or using a command,falseif not.- Parameters:
player- player to check- Returns:
trueif hidden,falseif not
-