Remove useless adapter

Probably a relic from an old migration
This commit is contained in:
Magnus Ulf 2020-01-16 23:38:46 +01:00
parent a7f794b5f8
commit 8437a05660
2 changed files with 1 additions and 48 deletions

View File

@ -3,7 +3,6 @@ package com.massivecraft.factions;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.massivecraft.factions.adapter.BoardAdapter; import com.massivecraft.factions.adapter.BoardAdapter;
import com.massivecraft.factions.adapter.BoardMapAdapter; import com.massivecraft.factions.adapter.BoardMapAdapter;
import com.massivecraft.factions.adapter.RelAdapter;
import com.massivecraft.factions.adapter.TerritoryAccessAdapter; import com.massivecraft.factions.adapter.TerritoryAccessAdapter;
import com.massivecraft.factions.chat.modifier.ChatModifierLc; import com.massivecraft.factions.chat.modifier.ChatModifierLc;
import com.massivecraft.factions.chat.modifier.ChatModifierLp; import com.massivecraft.factions.chat.modifier.ChatModifierLp;
@ -72,9 +71,9 @@ import com.massivecraft.factions.integration.placeholderapi.IntegrationPlacehold
import com.massivecraft.factions.integration.venturechat.IntegrationVentureChat; import com.massivecraft.factions.integration.venturechat.IntegrationVentureChat;
import com.massivecraft.factions.integration.worldguard.IntegrationWorldGuard; import com.massivecraft.factions.integration.worldguard.IntegrationWorldGuard;
import com.massivecraft.factions.mixin.PowerMixin; import com.massivecraft.factions.mixin.PowerMixin;
import com.massivecraft.factions.task.TaskTax;
import com.massivecraft.factions.task.TaskFlagPermCreate; import com.massivecraft.factions.task.TaskFlagPermCreate;
import com.massivecraft.factions.task.TaskPlayerPowerUpdate; import com.massivecraft.factions.task.TaskPlayerPowerUpdate;
import com.massivecraft.factions.task.TaskTax;
import com.massivecraft.massivecore.MassivePlugin; import com.massivecraft.massivecore.MassivePlugin;
import com.massivecraft.massivecore.command.type.RegistryType; import com.massivecraft.massivecore.command.type.RegistryType;
import com.massivecraft.massivecore.store.migrator.MigratorUtil; import com.massivecraft.massivecore.store.migrator.MigratorUtil;
@ -282,7 +281,6 @@ public class Factions extends MassivePlugin
.registerTypeAdapter(TerritoryAccess.class, TerritoryAccessAdapter.get()) .registerTypeAdapter(TerritoryAccess.class, TerritoryAccessAdapter.get())
.registerTypeAdapter(Board.class, BoardAdapter.get()) .registerTypeAdapter(Board.class, BoardAdapter.get())
.registerTypeAdapter(Board.MAP_TYPE, BoardMapAdapter.get()) .registerTypeAdapter(Board.MAP_TYPE, BoardMapAdapter.get())
.registerTypeAdapter(Rel.class, RelAdapter.get())
; ;
} }

View File

@ -1,45 +0,0 @@
package com.massivecraft.factions.adapter;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeRel;
import com.massivecraft.massivecore.MassiveException;
import java.lang.reflect.Type;
public class RelAdapter implements JsonDeserializer<Rel>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static RelAdapter i = new RelAdapter();
public static RelAdapter get() { return i; }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public Rel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
try
{
return TypeRel.get().read(json.getAsString());
}
catch (MassiveException e)
{
return null;
}
catch (Exception ex)
{
System.out.println(json);
throw ex;
}
}
}