From 8437a056602a925fefaf056d86608599ce008d89 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Thu, 16 Jan 2020 23:38:46 +0100 Subject: [PATCH] Remove useless adapter Probably a relic from an old migration --- src/com/massivecraft/factions/Factions.java | 4 +- .../factions/adapter/RelAdapter.java | 45 ------------------- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 src/com/massivecraft/factions/adapter/RelAdapter.java diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 39fc6cde..fb3c4267 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -3,7 +3,6 @@ package com.massivecraft.factions; import com.google.gson.GsonBuilder; import com.massivecraft.factions.adapter.BoardAdapter; import com.massivecraft.factions.adapter.BoardMapAdapter; -import com.massivecraft.factions.adapter.RelAdapter; import com.massivecraft.factions.adapter.TerritoryAccessAdapter; import com.massivecraft.factions.chat.modifier.ChatModifierLc; 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.worldguard.IntegrationWorldGuard; import com.massivecraft.factions.mixin.PowerMixin; -import com.massivecraft.factions.task.TaskTax; import com.massivecraft.factions.task.TaskFlagPermCreate; import com.massivecraft.factions.task.TaskPlayerPowerUpdate; +import com.massivecraft.factions.task.TaskTax; import com.massivecraft.massivecore.MassivePlugin; import com.massivecraft.massivecore.command.type.RegistryType; import com.massivecraft.massivecore.store.migrator.MigratorUtil; @@ -282,7 +281,6 @@ public class Factions extends MassivePlugin .registerTypeAdapter(TerritoryAccess.class, TerritoryAccessAdapter.get()) .registerTypeAdapter(Board.class, BoardAdapter.get()) .registerTypeAdapter(Board.MAP_TYPE, BoardMapAdapter.get()) - .registerTypeAdapter(Rel.class, RelAdapter.get()) ; } diff --git a/src/com/massivecraft/factions/adapter/RelAdapter.java b/src/com/massivecraft/factions/adapter/RelAdapter.java deleted file mode 100644 index ebe61f12..00000000 --- a/src/com/massivecraft/factions/adapter/RelAdapter.java +++ /dev/null @@ -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 -{ - // -------------------------------------------- // - // 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; - } - } - -}