Commits
md_5 authored b673e157003
1 1 | package org.bukkit.scoreboard; |
2 2 | |
3 3 | import java.util.Set; |
4 4 | |
5 + | import org.bukkit.ChatColor; |
5 6 | import org.bukkit.OfflinePlayer; |
6 7 | import org.bukkit.potion.PotionEffectType; |
7 8 | |
8 9 | /** |
9 10 | * A team on a scoreboard that has a common display theme and other |
10 11 | * properties. This team is only relevant to the display of the associated |
11 12 | * {@link #getScoreboard() scoreboard}. |
12 13 | */ |
13 14 | public interface Team { |
14 15 | |
69 70 | * Sets the suffix appended to the display of entries on this team. |
70 71 | * |
71 72 | * @param suffix the new suffix for this team. |
72 73 | * @throws IllegalArgumentException if suffix is null |
73 74 | * @throws IllegalArgumentException if suffix is longer than 16 |
74 75 | * characters |
75 76 | * @throws IllegalStateException if this team has been unregistered |
76 77 | */ |
77 78 | void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException; |
78 79 | |
80 + | /** |
81 + | * Gets the color of the team. |
82 + | * <br> |
83 + | * This only sets the team outline, other occurrences of colors such as in |
84 + | * names are handled by prefixes / suffixes. |
85 + | * |
86 + | * @return team color, defaults to {@link ChatColor#RESET} |
87 + | * @throws IllegalStateException |
88 + | */ |
89 + | ChatColor getColor() throws IllegalStateException; |
90 + | |
91 + | /** |
92 + | * Sets the color of the team. |
93 + | * <br> |
94 + | * This only sets the team outline, other occurrences of colors such as in |
95 + | * names are handled by prefixes / suffixes. |
96 + | * |
97 + | * @param color new color, must be non-null. Use {@link ChatColor#RESET} for |
98 + | * no color |
99 + | */ |
100 + | void setColor(ChatColor color); |
101 + | |
79 102 | /** |
80 103 | * Gets the team friendly fire state |
81 104 | * |
82 105 | * @return true if friendly fire is enabled |
83 106 | * @throws IllegalStateException if this team has been unregistered |
84 107 | */ |
85 108 | boolean allowFriendlyFire() throws IllegalStateException; |
86 109 | |
87 110 | /** |
88 111 | * Sets the team friendly fire state |