mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
47
nms-patches/ScoreboardTeam.patch
Normal file
47
nms-patches/ScoreboardTeam.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
--- a/net/minecraft/server/ScoreboardTeam.java
|
||||
+++ b/net/minecraft/server/ScoreboardTeam.java
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
- return this.d;
|
||||
+ return this.prefix + this.d + this.suffix; // CraftBukkit
|
||||
}
|
||||
|
||||
public IChatBaseComponent d() {
|
||||
@@ -165,4 +165,35 @@
|
||||
public EnumChatFormat getColor() {
|
||||
return this.k;
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ private String prefix;
|
||||
+ private String suffix;
|
||||
+
|
||||
+ public String getPrefix() {
|
||||
+ return prefix;
|
||||
+ }
|
||||
+
|
||||
+ public void setPrefix(String prefix) {
|
||||
+ if (prefix == null) {
|
||||
+ throw new IllegalArgumentException("Prefix cannot be null");
|
||||
+ }
|
||||
+
|
||||
+ this.prefix = prefix;
|
||||
+ this.a.handleTeamChanged(this);
|
||||
+ }
|
||||
+
|
||||
+ public String getSuffix() {
|
||||
+ return suffix;
|
||||
+ }
|
||||
+
|
||||
+ public void setSuffix(String suffix) {
|
||||
+ if (prefix == null) {
|
||||
+ throw new IllegalArgumentException("Suffix cannot be null");
|
||||
+ }
|
||||
+
|
||||
+ this.suffix = suffix;
|
||||
+ this.a.handleTeamChanged(this);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
Reference in New Issue
Block a user