@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/network/chat/ChatHexColor.java
|
||||
+++ b/net/minecraft/network/chat/ChatHexColor.java
|
||||
@@ -11,7 +11,7 @@
|
||||
public final class ChatHexColor {
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
private static final Map<EnumChatFormat, ChatHexColor> a = (Map) Stream.of(EnumChatFormat.values()).filter(EnumChatFormat::d).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> {
|
||||
private static final String CUSTOM_COLOR_PREFIX = "#";
|
||||
private static final Map<EnumChatFormat, ChatHexColor> LEGACY_FORMAT_TO_COLOR = (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) -> {
|
||||
private static final Map<String, ChatHexColor> NAMED_COLORS = (Map) ChatHexColor.LEGACY_FORMAT_TO_COLOR.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> {
|
||||
return chathexcolor.name;
|
||||
@@ -19,16 +19,22 @@
|
||||
private final int rgb;
|
||||
@@ -20,16 +20,22 @@
|
||||
private final int value;
|
||||
@Nullable
|
||||
public final String name;
|
||||
+ // CraftBukkit start
|
||||
@@ -19,17 +19,17 @@
|
||||
|
||||
- private ChatHexColor(int i, String s) {
|
||||
+ private ChatHexColor(int i, String s, EnumChatFormat format) {
|
||||
this.rgb = i;
|
||||
this.value = i;
|
||||
this.name = s;
|
||||
+ this.format = format;
|
||||
}
|
||||
|
||||
private ChatHexColor(int i) {
|
||||
this.rgb = i;
|
||||
this.value = i;
|
||||
this.name = null;
|
||||
+ this.format = null;
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
public String b() {
|
||||
return this.name != null ? this.name : this.c();
|
||||
public int a() {
|
||||
return this.value;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- a/net/minecraft/network/chat/ChatModifier.java
|
||||
+++ b/net/minecraft/network/chat/ChatModifier.java
|
||||
@@ -118,6 +118,20 @@
|
||||
return new ChatModifier(this.color, this.bold, obool, this.underlined, this.strikethrough, this.obfuscated, this.clickEvent, this.hoverEvent, this.insertion, this.font);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public ChatModifier setStrikethrough(@Nullable Boolean obool) {
|
||||
+ return new ChatModifier(this.color, this.bold, this.italic, this.underlined, obool, this.obfuscated, this.clickEvent, this.hoverEvent, this.insertion, this.font);
|
||||
+ }
|
||||
+
|
||||
+ public ChatModifier setUnderline(@Nullable Boolean obool) {
|
||||
+ return new ChatModifier(this.color, this.bold, this.italic, obool, this.strikethrough, this.obfuscated, this.clickEvent, this.hoverEvent, this.insertion, this.font);
|
||||
+ }
|
||||
+
|
||||
+ public ChatModifier setRandom(@Nullable Boolean obool) {
|
||||
+ return new ChatModifier(this.color, this.bold, this.italic, this.underlined, this.strikethrough, obool, this.clickEvent, this.hoverEvent, this.insertion, this.font);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public ChatModifier setChatClickable(@Nullable ChatClickable chatclickable) {
|
||||
return new ChatModifier(this.color, this.bold, this.italic, this.underlined, this.strikethrough, this.obfuscated, chatclickable, this.hoverEvent, this.insertion, this.font);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/network/chat/IChatBaseComponent.java
|
||||
+++ b/net/minecraft/network/chat/IChatBaseComponent.java
|
||||
@@ -27,7 +27,23 @@
|
||||
import net.minecraft.util.ChatDeserializer;
|
||||
@@ -29,7 +29,23 @@
|
||||
import net.minecraft.util.ChatTypeAdapterFactory;
|
||||
import net.minecraft.util.FormattedString;
|
||||
|
||||
-public interface IChatBaseComponent extends Message, IChatFormatted {
|
||||
+// CraftBukkit start
|
||||
|
||||
Reference in New Issue
Block a user