summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-05-28 10:59:55 +1000
committermd_5 <git@md-5.net>2017-05-28 10:59:55 +1000
commitb673e1570036bac636c01c11a8526867f23af45c (patch)
treef752c6734614839fa1fe884dae59dba38cd02d63 /src/main
parent17ec944682dfbd068b1ec47cf352db6cb43edf1d (diff)
downloadbukkit-b673e1570036bac636c01c11a8526867f23af45c.tar
bukkit-b673e1570036bac636c01c11a8526867f23af45c.tar.gz
bukkit-b673e1570036bac636c01c11a8526867f23af45c.tar.lz
bukkit-b673e1570036bac636c01c11a8526867f23af45c.tar.xz
bukkit-b673e1570036bac636c01c11a8526867f23af45c.zip
Add color API for Teams
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/scoreboard/Team.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index 9052b4a0..170ae21a 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -2,6 +2,7 @@ package org.bukkit.scoreboard;
import java.util.Set;
+import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.potion.PotionEffectType;
@@ -77,6 +78,28 @@ public interface Team {
void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException;
/**
+ * Gets the color of the team.
+ * <br>
+ * This only sets the team outline, other occurrences of colors such as in
+ * names are handled by prefixes / suffixes.
+ *
+ * @return team color, defaults to {@link ChatColor#RESET}
+ * @throws IllegalStateException
+ */
+ ChatColor getColor() throws IllegalStateException;
+
+ /**
+ * Sets the color of the team.
+ * <br>
+ * This only sets the team outline, other occurrences of colors such as in
+ * names are handled by prefixes / suffixes.
+ *
+ * @param color new color, must be non-null. Use {@link ChatColor#RESET} for
+ * no color
+ */
+ void setColor(ChatColor color);
+
+ /**
* Gets the team friendly fire state
*
* @return true if friendly fire is enabled