Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 08:30:10 +01:00
Also process hovered text
Dieser Commit ist enthalten in:
Ursprung
b1ca8cc2a0
Commit
49daeb33c0
@ -68,14 +68,12 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter {
|
|||||||
String action = hoverEvent.getAsJsonPrimitive("action").getAsString();
|
String action = hoverEvent.getAsJsonPrimitive("action").getAsString();
|
||||||
if (contentsElement != null) {
|
if (contentsElement != null) {
|
||||||
if (action.equals("show_text")) {
|
if (action.equals("show_text")) {
|
||||||
// text as chat component
|
// show_text as chat component
|
||||||
|
processTranslate(contentsElement);
|
||||||
hoverEvent.add("value", contentsElement);
|
hoverEvent.add("value", contentsElement);
|
||||||
} else {
|
} else {
|
||||||
// show_entity and show_item as plain strings in a text field
|
// show_entity and show_item as plain strings in a text field
|
||||||
final JsonObject jsonObject = new JsonObject();
|
hoverEvent.addProperty("value", contentsElement.toString());
|
||||||
jsonObject.addProperty("text", contentsElement.toString());
|
|
||||||
hoverEvent.add("value", jsonObject);
|
|
||||||
//hoverEvent.addProperty("value", contentsElement.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren