Rename adapter classes.
This commit is contained in:
parent
3ef3492c68
commit
14715d1cfc
@ -4,10 +4,10 @@ import java.lang.reflect.Modifier;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.massivecraft.factions.adapters.FFlagTypeAdapter;
|
import com.massivecraft.factions.adapters.FFlagAdapter;
|
||||||
import com.massivecraft.factions.adapters.FPermTypeAdapter;
|
import com.massivecraft.factions.adapters.FPermAdapter;
|
||||||
import com.massivecraft.factions.adapters.LocationTypeAdapter;
|
import com.massivecraft.factions.adapters.LazyLocationAdapter;
|
||||||
import com.massivecraft.factions.adapters.RelTypeAdapter;
|
import com.massivecraft.factions.adapters.RelAdapter;
|
||||||
import com.massivecraft.factions.adapters.TerritoryAccessAdapter;
|
import com.massivecraft.factions.adapters.TerritoryAccessAdapter;
|
||||||
import com.massivecraft.factions.cmd.*;
|
import com.massivecraft.factions.cmd.*;
|
||||||
import com.massivecraft.factions.integration.herochat.HerochatFeatures;
|
import com.massivecraft.factions.integration.herochat.HerochatFeatures;
|
||||||
@ -137,11 +137,11 @@ public class Factions extends MPlugin
|
|||||||
.setPrettyPrinting()
|
.setPrettyPrinting()
|
||||||
.disableHtmlEscaping()
|
.disableHtmlEscaping()
|
||||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT, Modifier.VOLATILE)
|
.excludeFieldsWithModifiers(Modifier.TRANSIENT, Modifier.VOLATILE)
|
||||||
.registerTypeAdapter(LazyLocation.class, new LocationTypeAdapter())
|
.registerTypeAdapter(LazyLocation.class, new LazyLocationAdapter())
|
||||||
.registerTypeAdapter(TerritoryAccess.class, TerritoryAccessAdapter.get())
|
.registerTypeAdapter(TerritoryAccess.class, TerritoryAccessAdapter.get())
|
||||||
.registerTypeAdapter(Rel.class, new RelTypeAdapter())
|
.registerTypeAdapter(Rel.class, new RelAdapter())
|
||||||
.registerTypeAdapter(FPerm.class, new FPermTypeAdapter())
|
.registerTypeAdapter(FPerm.class, new FPermAdapter())
|
||||||
.registerTypeAdapter(FFlag.class, new FFlagTypeAdapter());
|
.registerTypeAdapter(FFlag.class, new FFlagAdapter());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.craftbukkit.libs.com.google.gson.JsonParseException;
|
|||||||
|
|
||||||
import com.massivecraft.factions.FFlag;
|
import com.massivecraft.factions.FFlag;
|
||||||
|
|
||||||
public class FFlagTypeAdapter implements JsonDeserializer<FFlag>
|
public class FFlagAdapter implements JsonDeserializer<FFlag>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public FFlag deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
public FFlag deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
@ -9,7 +9,7 @@ import org.bukkit.craftbukkit.libs.com.google.gson.JsonParseException;
|
|||||||
|
|
||||||
import com.massivecraft.factions.FPerm;
|
import com.massivecraft.factions.FPerm;
|
||||||
|
|
||||||
public class FPermTypeAdapter implements JsonDeserializer<FPerm>
|
public class FPermAdapter implements JsonDeserializer<FPerm>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public FPerm deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
public FPerm deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
@ -15,7 +15,7 @@ import org.bukkit.craftbukkit.libs.com.google.gson.JsonSerializationContext;
|
|||||||
import org.bukkit.craftbukkit.libs.com.google.gson.JsonSerializer;
|
import org.bukkit.craftbukkit.libs.com.google.gson.JsonSerializer;
|
||||||
|
|
||||||
|
|
||||||
public class LocationTypeAdapter implements JsonDeserializer<LazyLocation>, JsonSerializer<LazyLocation>
|
public class LazyLocationAdapter implements JsonDeserializer<LazyLocation>, JsonSerializer<LazyLocation>
|
||||||
{
|
{
|
||||||
private static final String WORLD = "world";
|
private static final String WORLD = "world";
|
||||||
private static final String X = "x";
|
private static final String X = "x";
|
@ -9,7 +9,7 @@ import org.bukkit.craftbukkit.libs.com.google.gson.JsonParseException;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
|
|
||||||
public class RelTypeAdapter implements JsonDeserializer<Rel>
|
public class RelAdapter implements JsonDeserializer<Rel>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Rel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
public Rel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
Loading…
Reference in New Issue
Block a user