3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 08:30:10 +01:00

Remove unnecessary override

Dieser Commit ist enthalten in:
KennyTV 2020-06-02 11:19:28 +02:00
Ursprung aec46ecd38
Commit 2698725401
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -2,7 +2,6 @@ package nl.matsv.viabackwards.protocol.protocol1_15_2to1_16.chat;
import nl.matsv.viabackwards.api.BackwardsProtocol; import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.rewriters.TranslatableRewriter; import nl.matsv.viabackwards.api.rewriters.TranslatableRewriter;
import us.myles.ViaVersion.util.GsonUtil;
import us.myles.viaversion.libs.gson.JsonElement; import us.myles.viaversion.libs.gson.JsonElement;
import us.myles.viaversion.libs.gson.JsonObject; import us.myles.viaversion.libs.gson.JsonObject;
import us.myles.viaversion.libs.gson.JsonPrimitive; import us.myles.viaversion.libs.gson.JsonPrimitive;
@ -32,25 +31,12 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter {
super(protocol); super(protocol);
} }
@Override
public String processText(String value) {
JsonElement root = GsonUtil.getJsonParser().parse(value);
if (!root.isJsonObject()) {
return super.processText(value);
}
processText(root);
return super.processText(root.toString());
}
protected void processText(JsonElement value) { protected void processText(JsonElement value) {
super.processText(value); super.processText(value);
if (!value.isJsonObject()) return; if (!value.isJsonObject()) return;
JsonObject object = value.getAsJsonObject();
// c o l o r s // c o l o r s
JsonObject object = value.getAsJsonObject();
JsonPrimitive color = object.getAsJsonPrimitive("color"); JsonPrimitive color = object.getAsJsonPrimitive("color");
if (color != null) { if (color != null) {
String colorName = color.getAsString(); String colorName = color.getAsString();