Only changes enough to make everything work
This commit is contained in:
@@ -68,28 +68,28 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
|
||||
hostFactionId = element.getAsString();
|
||||
|
||||
element = obj.get(HOST_FACTION_ALLOWED);
|
||||
if (element != null) {
|
||||
hostFactionAllowed = element.getAsBoolean();
|
||||
}
|
||||
if (element != null) {
|
||||
hostFactionAllowed = element.getAsBoolean();
|
||||
}
|
||||
|
||||
element = obj.get(GRANTED_IDS);
|
||||
if (element != null) {
|
||||
grantedIds = context.deserialize(element, SET_OF_STRING_TYPE);
|
||||
}
|
||||
if (element != null) {
|
||||
grantedIds = context.deserialize(element, SET_OF_STRING_TYPE);
|
||||
}
|
||||
|
||||
element = obj.get(CHUNK_NAME);
|
||||
if (element != null) {
|
||||
chunkName = element.getAsString();
|
||||
}
|
||||
if (element != null) {
|
||||
chunkName = element.getAsString();
|
||||
}
|
||||
|
||||
return TerritoryAccess.valueOf(hostFactionId, hostFactionAllowed, grantedIds, chunkName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(TerritoryAccess src, Type typeOfSrc, JsonSerializationContext context) {
|
||||
if (src == null) {
|
||||
return null;
|
||||
}
|
||||
if (src == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// isDefault <=> simple hostFactionId string
|
||||
if (src.isDefault()) {
|
||||
|
Reference in New Issue
Block a user