13
0
geforkt von Mirrors/Paper
Paper/nms-patches/ChatHexColor.patch
2020-06-25 10:00:00 +10:00

36 Zeilen
1.3 KiB
Diff

--- a/net/minecraft/server/ChatHexColor.java
+++ b/net/minecraft/server/ChatHexColor.java
@@ -10,7 +10,7 @@
public final class ChatHexColor {
private static final Map<EnumChatFormat, ChatHexColor> a = (Map) Stream.of(EnumChatFormat.values()).filter(EnumChatFormat::d).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> {
- return new ChatHexColor(enumchatformat.e(), enumchatformat.f());
+ return new ChatHexColor(enumchatformat.e(), enumchatformat.f(), enumchatformat); // CraftBukkit
}));
private static final Map<String, ChatHexColor> b = (Map) ChatHexColor.a.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> {
return chathexcolor.name;
@@ -18,16 +18,22 @@
private final int rgb;
@Nullable
public final String name;
+ // CraftBukkit start
+ @Nullable
+ public final EnumChatFormat format;
- private ChatHexColor(int i, String s) {
+ private ChatHexColor(int i, String s, EnumChatFormat format) {
this.rgb = i;
this.name = s;
+ this.format = format;
}
private ChatHexColor(int i) {
this.rgb = i;
this.name = null;
+ this.format = null;
}
+ // CraftBukkit end
public String b() {
return this.name != null ? this.name : this.c();