mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-07 10:02:01 +01:00
Remove unnecessary override
This commit is contained in:
parent
aec46ecd38
commit
2698725401
@ -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.rewriters.TranslatableRewriter;
|
||||
import us.myles.ViaVersion.util.GsonUtil;
|
||||
import us.myles.viaversion.libs.gson.JsonElement;
|
||||
import us.myles.viaversion.libs.gson.JsonObject;
|
||||
import us.myles.viaversion.libs.gson.JsonPrimitive;
|
||||
@ -32,25 +31,12 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter {
|
||||
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) {
|
||||
super.processText(value);
|
||||
|
||||
if (!value.isJsonObject()) return;
|
||||
|
||||
JsonObject object = value.getAsJsonObject();
|
||||
|
||||
// c o l o r s
|
||||
JsonObject object = value.getAsJsonObject();
|
||||
JsonPrimitive color = object.getAsJsonPrimitive("color");
|
||||
if (color != null) {
|
||||
String colorName = color.getAsString();
|
||||
|
Loading…
Reference in New Issue
Block a user