More plugin customization / Renamed Rectangle
This commit is contained in:
@@ -20,7 +20,7 @@ public class JsonIO{
|
||||
|
||||
@Override
|
||||
public void writeValue(Object value, Class knownType, Class elementType){
|
||||
if(value instanceof mindustry.ctype.MappableContent){
|
||||
if(value instanceof MappableContent){
|
||||
try{
|
||||
getWriter().value(((MappableContent)value).name);
|
||||
}catch(IOException e){
|
||||
@@ -95,6 +95,18 @@ public class JsonIO{
|
||||
}
|
||||
});
|
||||
|
||||
json.setSerializer(Team.class, new Serializer<Team>(){
|
||||
@Override
|
||||
public void write(Json json, Team object, Class knownType){
|
||||
json.writeValue(object.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Team read(Json json, JsonValue jsonData, Class type){
|
||||
return Team.get(jsonData.asInt());
|
||||
}
|
||||
});
|
||||
|
||||
json.setSerializer(Block.class, new Serializer<Block>(){
|
||||
@Override
|
||||
public void write(Json json, Block object, Class knownType){
|
||||
|
||||
Reference in New Issue
Block a user