mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
66779f5c86
== AT == public net.minecraft.network.chat.HoverEvent$ItemStackInfo item public net.minecraft.network.chat.HoverEvent$ItemStackInfo count public net.minecraft.network.chat.HoverEvent$ItemStackInfo components public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult; Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
21 lines
675 B
Diff
21 lines
675 B
Diff
--- a/net/minecraft/ChatFormatting.java
|
|
+++ b/net/minecraft/ChatFormatting.java
|
|
@@ -112,6 +112,18 @@
|
|
return name == null ? null : FORMATTING_BY_NAME.get(cleanName(name));
|
|
}
|
|
|
|
+ // Paper start - add method to get by hex value
|
|
+ @Nullable public static ChatFormatting getByHexValue(int i) {
|
|
+ for (ChatFormatting value : values()) {
|
|
+ if (value.getColor() != null && value.getColor() == i) {
|
|
+ return value;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ return null;
|
|
+ }
|
|
+ // Paper end - add method to get by hex value
|
|
+
|
|
@Nullable
|
|
public static ChatFormatting getById(int colorIndex) {
|
|
if (colorIndex < 0) {
|