This repository has been archived on 2024-05-08. You can view files and clone it, but cannot push or open issues or pull requests.

27 lines
637 B
Java

package ru.redguy.webinfomod.langs;
import com.google.gson.JsonObject;
public class Titles implements RootCategory {
JsonObject jsonObject;
public Titles(JsonObject jsonObject) {
this.jsonObject = jsonObject;
}
@Override
public String getString(Object object) {
if(object instanceof String) {
return jsonObject.get((String) object).getAsString();
} else {
return jsonObject.get(((ru.redguy.webinfomod.langs.enums.Titles) object).getName()).getAsString();
}
}
@Override
public Category getCategory(Object object) {
return null;
}
}