From 701901f64b2c5b8f05da8461a74dbdfd09e0551d Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 28 May 2017 10:59:55 +1000 Subject: [PATCH] Add color API for Teams By: md_5 --- .../main/java/org/bukkit/scoreboard/Team.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/scoreboard/Team.java b/paper-api/src/main/java/org/bukkit/scoreboard/Team.java index 9052b4a0bd..170ae21abb 100644 --- a/paper-api/src/main/java/org/bukkit/scoreboard/Team.java +++ b/paper-api/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; @@ -76,6 +77,28 @@ public interface Team { */ void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException; + /** + * 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. + * + * @return team color, defaults to {@link ChatColor#RESET} + * @throws IllegalStateException + */ + ChatColor getColor() throws IllegalStateException; + + /** + * 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. + * + * @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 *