Interface Mannschaft


public interface Mannschaft
A team on a anzeigetafel that has a common display theme and other properties. This team is only relevant to the display of the associated anzeigetafel.
  • Method Details

    • getName

      @NotNull String getName()
      Gets the name of this Mannschaft
      Returns:
      Ziel name
      Throws:
      IllegalStateException - if this team has been unregistered
    • getDisplayName

      @NotNull String getDisplayName()
      Gets the name displayed to entries for this team
      Returns:
      Mannschaft display name
      Throws:
      IllegalStateException - if this team has been unregistered
    • setDisplayName

      void setDisplayName(@NotNull String displayName)
      Sets the name displayed to entries for this team
      Parameters:
      displayName - New display name
      Throws:
      IllegalStateException - if this team has been unregistered
    • getPrefix

      @NotNull String getPrefix()
      Gets the prefix prepended to the display of entries on this team.
      Returns:
      Mannschaft prefix
      Throws:
      IllegalStateException - if this team has been unregistered
    • setPrefix

      void setPrefix(@NotNull String prefix)
      Sets the prefix prepended to the display of entries on this team.
      Parameters:
      prefix - New prefix
      Throws:
      IllegalStateException - if this team has been unregistered
    • getSuffix

      @NotNull String getSuffix()
      Gets the suffix appended to the display of entries on this team.
      Returns:
      the team's current suffix
      Throws:
      IllegalStateException - if this team has been unregistered
    • setSuffix

      void setSuffix(@NotNull String suffix)
      Sets the suffix appended to the display of entries on this team.
      Parameters:
      suffix - the new suffix for this team.
      Throws:
      IllegalStateException - if this team has been unregistered
    • getColor

      @NotNull ChatFarbe getColor()
      Gets the color of the team.
      This only sets the team outline, other occurrences of colors such as in names are handled by prefixes / suffixes.
      Returns:
      team color, vorgaben to ChatFarbe.RESET
      Throws:
      IllegalStateException - if this team has been unregistered
    • setColor

      void setColor(@NotNull ChatFarbe color)
      Sets the color of the team.
      This only sets the team outline, other occurrences of colors such as in names are handled by prefixes / suffixes.
      Parameters:
      color - new color, must be non-null. Use ChatFarbe.RESET for no color
    • allowFriendlyFire

      boolean allowFriendlyFire()
      Gets the team friendly fire state
      Returns:
      true if friendly fire is enabled
      Throws:
      IllegalStateException - if this team has been unregistered
    • setAllowFriendlyFire

      void setAllowFriendlyFire(boolean enabled)
      Sets the team friendly fire state
      Parameters:
      enabled - true if friendly fire is to be allowed
      Throws:
      IllegalStateException - if this team has been unregistered
    • canSeeFriendlyInvisibles

      boolean canSeeFriendlyInvisibles()
      Gets the team's ability to see invisible teammates.
      Returns:
      true if team members can see invisible members
      Throws:
      IllegalStateException - if this team has been unregistered
    • setCanSeeFriendlyInvisibles

      void setCanSeeFriendlyInvisibles(boolean enabled)
      Sets the team's ability to see invisible teammates.
      Parameters:
      enabled - true if invisible teammates are to be visible
      Throws:
      IllegalStateException - if this team has been unregistered
    • getNameTagVisibility

      @Deprecated @NotNull NameTagVisibility getNameTagVisibility()
      Gets the team's ability to see name tags
      Returns:
      the current name tag visibility for the team
      Throws:
      IllegalArgumentException - if this team has been unregistered
    • setNameTagVisibility

      @Deprecated void setNameTagVisibility(@NotNull NameTagVisibility visibility)
      Set's the team's ability to see name tags
      Parameters:
      visibility - The nameTagVisibility to set
      Throws:
      IllegalArgumentException - if this team has been unregistered
    • getPlayers

      @Deprecated @NotNull Set<OfflineSpieler> getPlayers()
      Deprecated.
      Teams can contain entries that aren't players
      Gets the Set of players on the team
      Returns:
      players on the team
      Throws:
      IllegalStateException - if this team has been unregistered
      See Also:
    • getEntries

      @NotNull Set<String> getEntries()
      Gets the Set of entries on the team
      Returns:
      entries on the team
      Throws:
      IllegalStateException - if this entries has been unregistered
    • getSize

      int getSize()
      Gets the size of the team
      Returns:
      number of entries on the team
      Throws:
      IllegalStateException - if this team has been unregistered
    • getScoreboard

      @Nullable Anzeigetafel getScoreboard()
      Gets the Anzeigetafel to which this team is attached
      Returns:
      Owning anzeigetafel, or null if this team has been unregistered
    • addPlayer

      @Deprecated void addPlayer(@NotNull OfflineSpieler player)
      Deprecated.
      Teams can contain entries that aren't players
      This puts the specified spieler onto this team for the anzeigetafel.

      This will remove the spieler from any other team on the anzeigetafel.

      Parameters:
      player - the spieler to add
      Throws:
      IllegalStateException - if this team has been unregistered
      See Also:
    • addEntry

      void addEntry(@NotNull String entry)
      This puts the specified entry onto this team for the anzeigetafel.

      This will remove the entry from any other team on the anzeigetafel.

      Parameters:
      entry - the entry to add
      Throws:
      IllegalStateException - if this team has been unregistered
    • removePlayer

      @Deprecated boolean removePlayer(@NotNull OfflineSpieler player)
      Deprecated.
      Teams can contain entries that aren't players
      Removes the spieler from this team.
      Parameters:
      player - the spieler to remove
      Returns:
      if the spieler was on this team
      Throws:
      IllegalStateException - if this team has been unregistered
      See Also:
    • removeEntry

      boolean removeEntry(@NotNull String entry)
      Removes the entry from this team.
      Parameters:
      entry - the entry to remove
      Returns:
      if the entry was a part of this team
      Throws:
      IllegalStateException - if this team has been unregistered
    • unregister

      void unregister()
      Unregisters this team from the Anzeigetafel
      Throws:
      IllegalStateException - if this team has been unregistered
    • hasPlayer

      @Deprecated boolean hasPlayer(@NotNull OfflineSpieler player)
      Deprecated.
      Teams can contain entries that aren't players
      Checks to see if the specified spieler is a member of this team.
      Parameters:
      player - the spieler to search for
      Returns:
      true if the spieler is a member of this team
      Throws:
      IllegalStateException - if this team has been unregistered
      See Also:
    • hasEntry

      boolean hasEntry(@NotNull String entry)
      Checks to see if the specified entry is a member of this team.
      Parameters:
      entry - the entry to search for
      Returns:
      true if the entry is a member of this team
      Throws:
      IllegalStateException - if this team has been unregistered
    • getOption

      @NotNull Mannschaft.OptionStatus getOption(@NotNull Mannschaft.Option option)
      Get an option for this team
      Parameters:
      option - the option to get
      Returns:
      the option status
      Throws:
      IllegalStateException - if this team has been unregistered
    • setOption

      void setOption(@NotNull Mannschaft.Option option, @NotNull Mannschaft.OptionStatus status)
      Set an option for this team
      Parameters:
      option - the option to set
      status - the new option status
      Throws:
      IllegalStateException - if this team has been unregistered