summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-16 10:20:53 +1000
committermd_5 <git@md-5.net>2018-07-16 10:20:53 +1000
commit3890544e04e1b406b97c0f098a575ecc4b8865c6 (patch)
tree69e9195408cff664309a6ac234f53769be376b96 /src/main
parentee3c26688e32e8dd15b30eaa8d46ada64f13c865 (diff)
downloadcraftbukkit-3890544e04e1b406b97c0f098a575ecc4b8865c6.tar
craftbukkit-3890544e04e1b406b97c0f098a575ecc4b8865c6.tar.gz
craftbukkit-3890544e04e1b406b97c0f098a575ecc4b8865c6.tar.lz
craftbukkit-3890544e04e1b406b97c0f098a575ecc4b8865c6.tar.xz
craftbukkit-3890544e04e1b406b97c0f098a575ecc4b8865c6.zip
SPIGOT-4015: Make CraftTeam tie into backing prefix/suffix
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 17865e65..1cbcfc94 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -47,7 +47,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public String getPrefix() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return team.getPrefix();
+ return CraftChatMessage.fromComponent(team.e());
}
public void setPrefix(String prefix) throws IllegalStateException, IllegalArgumentException {
@@ -55,13 +55,13 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
Validate.isTrue(prefix.length() <= 16, "Prefix '" + prefix + "' is longer than the limit of 16 characters");
CraftScoreboard scoreboard = checkState();
- team.setPrefix(prefix);
+ team.a(CraftChatMessage.fromStringOrNull(prefix));
}
public String getSuffix() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return team.getSuffix();
+ return CraftChatMessage.fromComponent(team.f());
}
public void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException {
@@ -69,7 +69,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
Validate.isTrue(suffix.length() <= 16, "Suffix '" + suffix + "' is longer than the limit of 16 characters");
CraftScoreboard scoreboard = checkState();
- team.setSuffix(suffix);
+ team.b(CraftChatMessage.fromStringOrNull(suffix));
}
@Override
@@ -85,7 +85,6 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
CraftScoreboard scoreboard = checkState();
team.setColor(CraftChatMessage.getColor(color));
- scoreboard.board.handleTeamChanged(team); // SPIGOT-3684 - backing team fires this for prefix/suffix but not colour
}
public boolean allowFriendlyFire() throws IllegalStateException {