Add BannerPatterns upgrade adapter. Give adapters some <3.
This commit is contained in:
parent
cfa0c23b3d
commit
b491cd72f8
@ -1,6 +1,7 @@
|
|||||||
package com.massivecraft.massivecore;
|
package com.massivecraft.massivecore;
|
||||||
|
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -13,6 +14,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
|
|
||||||
import com.massivecraft.massivecore.adapter.AdapterBackstringEnumSet;
|
import com.massivecraft.massivecore.adapter.AdapterBackstringEnumSet;
|
||||||
|
import com.massivecraft.massivecore.adapter.AdapterBannerPatterns;
|
||||||
import com.massivecraft.massivecore.adapter.AdapterEntry;
|
import com.massivecraft.massivecore.adapter.AdapterEntry;
|
||||||
import com.massivecraft.massivecore.adapter.AdapterInventory;
|
import com.massivecraft.massivecore.adapter.AdapterInventory;
|
||||||
import com.massivecraft.massivecore.adapter.AdapterItemStack;
|
import com.massivecraft.massivecore.adapter.AdapterItemStack;
|
||||||
@ -61,6 +63,7 @@ import com.massivecraft.massivecore.engine.EngineMassiveCoreTeleportMixinCause;
|
|||||||
import com.massivecraft.massivecore.engine.EngineMassiveCoreVariable;
|
import com.massivecraft.massivecore.engine.EngineMassiveCoreVariable;
|
||||||
import com.massivecraft.massivecore.engine.EngineMassiveCoreWorldNameSet;
|
import com.massivecraft.massivecore.engine.EngineMassiveCoreWorldNameSet;
|
||||||
import com.massivecraft.massivecore.integration.vault.IntegrationVault;
|
import com.massivecraft.massivecore.integration.vault.IntegrationVault;
|
||||||
|
import com.massivecraft.massivecore.item.DataBannerPattern;
|
||||||
import com.massivecraft.massivecore.item.WriterBannerPattern;
|
import com.massivecraft.massivecore.item.WriterBannerPattern;
|
||||||
import com.massivecraft.massivecore.item.WriterFireworkEffect;
|
import com.massivecraft.massivecore.item.WriterFireworkEffect;
|
||||||
import com.massivecraft.massivecore.item.WriterItemStack;
|
import com.massivecraft.massivecore.item.WriterItemStack;
|
||||||
@ -98,6 +101,7 @@ import com.massivecraft.massivecore.xlib.gson.JsonArray;
|
|||||||
import com.massivecraft.massivecore.xlib.gson.JsonNull;
|
import com.massivecraft.massivecore.xlib.gson.JsonNull;
|
||||||
import com.massivecraft.massivecore.xlib.gson.JsonObject;
|
import com.massivecraft.massivecore.xlib.gson.JsonObject;
|
||||||
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
|
import com.massivecraft.massivecore.xlib.gson.JsonPrimitive;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.reflect.TypeToken;
|
||||||
|
|
||||||
public class MassiveCore extends MassivePlugin
|
public class MassiveCore extends MassivePlugin
|
||||||
{
|
{
|
||||||
@ -134,39 +138,59 @@ public class MassiveCore extends MassivePlugin
|
|||||||
|
|
||||||
public static GsonBuilder getMassiveCoreGsonBuilder()
|
public static GsonBuilder getMassiveCoreGsonBuilder()
|
||||||
{
|
{
|
||||||
return new GsonBuilder()
|
// Create
|
||||||
.setPrettyPrinting()
|
GsonBuilder ret = new GsonBuilder();
|
||||||
.disableHtmlEscaping()
|
|
||||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
|
||||||
.registerTypeAdapter(JsonNull.class, AdapterJsonElement.get())
|
|
||||||
.registerTypeAdapter(JsonPrimitive.class, AdapterJsonElement.get())
|
|
||||||
.registerTypeAdapter(JsonArray.class, AdapterJsonElement.get())
|
|
||||||
.registerTypeAdapter(JsonObject.class, AdapterJsonElement.get())
|
|
||||||
.registerTypeAdapter(Sound.class, AdapterSound.get())
|
|
||||||
.registerTypeAdapter(UUID.class, AdapterUUID.get())
|
|
||||||
.registerTypeAdapter(ItemStack.class, AdapterItemStack.get())
|
|
||||||
.registerTypeAdapter(Inventory.class, AdapterInventory.get())
|
|
||||||
.registerTypeAdapter(PlayerInventory.class, AdapterPlayerInventory.get())
|
|
||||||
.registerTypeAdapter(PS.class, PSAdapter.get())
|
|
||||||
|
|
||||||
.registerTypeAdapter(MassiveList.class, AdapterMassiveList.get())
|
// Basic Behavior
|
||||||
.registerTypeAdapter(MassiveListDef.class, AdapterMassiveList.get())
|
ret.setPrettyPrinting();
|
||||||
.registerTypeAdapter(MassiveMap.class, AdapterMassiveMap.get())
|
ret.disableHtmlEscaping();
|
||||||
.registerTypeAdapter(MassiveMapDef.class, AdapterMassiveMap.get())
|
ret.excludeFieldsWithModifiers(Modifier.TRANSIENT);
|
||||||
.registerTypeAdapter(MassiveSet.class, AdapterMassiveSet.get())
|
|
||||||
.registerTypeAdapter(MassiveSetDef.class, AdapterMassiveSet.get())
|
|
||||||
.registerTypeAdapter(MassiveTreeMap.class, AdapterMassiveTreeMap.get())
|
|
||||||
.registerTypeAdapter(MassiveTreeMapDef.class, AdapterMassiveTreeMap.get())
|
|
||||||
.registerTypeAdapter(MassiveTreeSet.class, AdapterMassiveTreeSet.get())
|
|
||||||
.registerTypeAdapter(MassiveTreeSetDef.class, AdapterMassiveTreeSet.get())
|
|
||||||
|
|
||||||
.registerTypeAdapter(Mson.class, AdapterMson.get())
|
// Raw Adapters
|
||||||
.registerTypeAdapter(MsonEvent.class, AdapterMsonEvent.get())
|
ret.registerTypeAdapter(JsonNull.class, AdapterJsonElement.get());
|
||||||
|
ret.registerTypeAdapter(JsonPrimitive.class, AdapterJsonElement.get());
|
||||||
|
ret.registerTypeAdapter(JsonArray.class, AdapterJsonElement.get());
|
||||||
|
ret.registerTypeAdapter(JsonObject.class, AdapterJsonElement.get());
|
||||||
|
|
||||||
.registerTypeAdapter(BackstringEnumSet.class, AdapterBackstringEnumSet.get())
|
// Enumeration Annotation Dodge
|
||||||
.registerTypeAdapter(Entry.class, AdapterEntry.get())
|
ret.registerTypeAdapterFactory(AdapterModdedEnumType.ENUM_FACTORY);
|
||||||
|
|
||||||
.registerTypeAdapterFactory(AdapterModdedEnumType.ENUM_FACTORY);
|
// Entries (Is this still needed?)
|
||||||
|
ret.registerTypeAdapter(Entry.class, AdapterEntry.get());
|
||||||
|
|
||||||
|
// Assorted Custom
|
||||||
|
ret.registerTypeAdapter(BackstringEnumSet.class, AdapterBackstringEnumSet.get());
|
||||||
|
ret.registerTypeAdapter(PS.class, PSAdapter.get());
|
||||||
|
ret.registerTypeAdapter(Sound.class, AdapterSound.get());
|
||||||
|
ret.registerTypeAdapter(UUID.class, AdapterUUID.get());
|
||||||
|
|
||||||
|
// Mson
|
||||||
|
ret.registerTypeAdapter(Mson.class, AdapterMson.get());
|
||||||
|
ret.registerTypeAdapter(MsonEvent.class, AdapterMsonEvent.get());
|
||||||
|
|
||||||
|
// Items and Inventories
|
||||||
|
ret.registerTypeAdapter(ItemStack.class, AdapterItemStack.get());
|
||||||
|
ret.registerTypeAdapter(Inventory.class, AdapterInventory.get());
|
||||||
|
ret.registerTypeAdapter(PlayerInventory.class, AdapterPlayerInventory.get());
|
||||||
|
|
||||||
|
// Banner Patterns Upgrade Adapter
|
||||||
|
Type typeBannerPatterns = new TypeToken<MassiveListDef<DataBannerPattern>>(){}.getType();
|
||||||
|
ret.registerTypeAdapter(typeBannerPatterns, AdapterBannerPatterns.get());
|
||||||
|
|
||||||
|
// Massive Containers
|
||||||
|
ret.registerTypeAdapter(MassiveList.class, AdapterMassiveList.get());
|
||||||
|
ret.registerTypeAdapter(MassiveListDef.class, AdapterMassiveList.get());
|
||||||
|
ret.registerTypeAdapter(MassiveMap.class, AdapterMassiveMap.get());
|
||||||
|
ret.registerTypeAdapter(MassiveMapDef.class, AdapterMassiveMap.get());
|
||||||
|
ret.registerTypeAdapter(MassiveSet.class, AdapterMassiveSet.get());
|
||||||
|
ret.registerTypeAdapter(MassiveSetDef.class, AdapterMassiveSet.get());
|
||||||
|
ret.registerTypeAdapter(MassiveTreeMap.class, AdapterMassiveTreeMap.get());
|
||||||
|
ret.registerTypeAdapter(MassiveTreeMapDef.class, AdapterMassiveTreeMap.get());
|
||||||
|
ret.registerTypeAdapter(MassiveTreeSet.class, AdapterMassiveTreeSet.get());
|
||||||
|
ret.registerTypeAdapter(MassiveTreeSetDef.class, AdapterMassiveTreeSet.get());
|
||||||
|
|
||||||
|
// Return
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getServerId() { return ConfServer.serverid; }
|
public static String getServerId() { return ConfServer.serverid; }
|
||||||
|
@ -25,7 +25,7 @@ public class AdapterBackstringEnumSet implements JsonDeserializer<BackstringEnum
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterBackstringEnumSet i = new AdapterBackstringEnumSet();
|
private static final AdapterBackstringEnumSet i = new AdapterBackstringEnumSet();
|
||||||
public static AdapterBackstringEnumSet get() { return i; }
|
public static AdapterBackstringEnumSet get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
package com.massivecraft.massivecore.adapter;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
import com.massivecraft.massivecore.collections.MassiveListDef;
|
||||||
|
import com.massivecraft.massivecore.item.DataBannerPattern;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonArray;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonDeserializationContext;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonDeserializer;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonElement;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonNull;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonObject;
|
||||||
|
import com.massivecraft.massivecore.xlib.gson.JsonParseException;
|
||||||
|
|
||||||
|
public class AdapterBannerPatterns implements JsonDeserializer<MassiveListDef<DataBannerPattern>>
|
||||||
|
{
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// INSTANCE & CONSTRUCT
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
private static final AdapterBannerPatterns i = new AdapterBannerPatterns();
|
||||||
|
public static AdapterBannerPatterns get() { return i; }
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// OVERRIDE
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// Default serialization is fine.
|
||||||
|
// We do however provide a smarter deserialiser.
|
||||||
|
// This is for the sole purpose of upgrading from the old deprecated database format.
|
||||||
|
//
|
||||||
|
// In the old version (around version 2.8.10) we made use of a list with primitives.
|
||||||
|
// id, color, id, color...
|
||||||
|
// They were just coming in that order and were not wrapped in some kind of entry.
|
||||||
|
//
|
||||||
|
// The data types are the same in the old and new version.
|
||||||
|
// String, Number, String, Number...
|
||||||
|
//
|
||||||
|
// In the new version we do however wrap them in the DataBannerPattern.
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MassiveListDef<DataBannerPattern> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
||||||
|
{
|
||||||
|
// Create
|
||||||
|
MassiveListDef<DataBannerPattern> ret = new MassiveListDef<>();
|
||||||
|
|
||||||
|
// Null (Def implementation is never null)
|
||||||
|
if (json == null) return ret;
|
||||||
|
if (json.equals(JsonNull.INSTANCE)) return ret;
|
||||||
|
|
||||||
|
// It is an array in both old and new version
|
||||||
|
JsonArray array = json.getAsJsonArray();
|
||||||
|
|
||||||
|
// Empty?
|
||||||
|
if (array.size() == 0) return ret;
|
||||||
|
|
||||||
|
// First element indicates version
|
||||||
|
JsonElement first = array.get(0);
|
||||||
|
if (first instanceof JsonObject)
|
||||||
|
{
|
||||||
|
// New
|
||||||
|
for (JsonElement element : array)
|
||||||
|
{
|
||||||
|
DataBannerPattern dataBannerPattern = context.deserialize(element, DataBannerPattern.class);
|
||||||
|
ret.add(dataBannerPattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Old aka Upgrade Mode
|
||||||
|
Iterator<JsonElement> iterator = array.iterator();
|
||||||
|
while (iterator.hasNext())
|
||||||
|
{
|
||||||
|
DataBannerPattern dataBannerPattern = new DataBannerPattern();
|
||||||
|
|
||||||
|
JsonElement idElement = iterator.next();
|
||||||
|
String id = idElement.getAsString();
|
||||||
|
dataBannerPattern.setId(id);
|
||||||
|
|
||||||
|
JsonElement colorElement = iterator.next();
|
||||||
|
Integer color = colorElement.getAsInt();
|
||||||
|
dataBannerPattern.setColor(color);
|
||||||
|
|
||||||
|
ret.add(dataBannerPattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -20,7 +20,7 @@ public class AdapterEntry implements JsonDeserializer<Entry<?, ?>>, JsonSerializ
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterEntry i = new AdapterEntry();
|
private static final AdapterEntry i = new AdapterEntry();
|
||||||
public static AdapterEntry get() { return i; }
|
public static AdapterEntry get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -53,7 +53,7 @@ public class AdapterInventory implements JsonDeserializer<Inventory>, JsonSerial
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterInventory i = new AdapterInventory();
|
private static final AdapterInventory i = new AdapterInventory();
|
||||||
public static AdapterInventory get() { return i; }
|
public static AdapterInventory get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -22,7 +22,7 @@ public class AdapterItemStack implements JsonDeserializer<ItemStack>, JsonSerial
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterItemStack i = new AdapterItemStack();
|
private static final AdapterItemStack i = new AdapterItemStack();
|
||||||
public static AdapterItemStack get() { return i; }
|
public static AdapterItemStack get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -73,7 +73,7 @@ public class AdapterItemStackInner17 implements AdapterItemStackInner
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterItemStackInner17 i = new AdapterItemStackInner17();
|
private static final AdapterItemStackInner17 i = new AdapterItemStackInner17();
|
||||||
public static AdapterItemStackInner17 get() { return i; }
|
public static AdapterItemStackInner17 get() { return i; }
|
||||||
public AdapterItemStackInner17()
|
public AdapterItemStackInner17()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ public class AdapterItemStackInner18 extends AdapterItemStackInner17
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterItemStackInner18 i = new AdapterItemStackInner18();
|
private static final AdapterItemStackInner18 i = new AdapterItemStackInner18();
|
||||||
public static AdapterItemStackInner18 get() { return i; }
|
public static AdapterItemStackInner18 get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -32,7 +32,7 @@ public class AdapterItemStackInner19 extends AdapterItemStackInner18
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterItemStackInner19 i = new AdapterItemStackInner19();
|
private static final AdapterItemStackInner19 i = new AdapterItemStackInner19();
|
||||||
public static AdapterItemStackInner19 get() { return i; }
|
public static AdapterItemStackInner19 get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -15,7 +15,7 @@ public class AdapterJsonElement implements JsonDeserializer<JsonElement>, JsonSe
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterJsonElement i = new AdapterJsonElement();
|
private static final AdapterJsonElement i = new AdapterJsonElement();
|
||||||
public static AdapterJsonElement get() { return i; }
|
public static AdapterJsonElement get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -14,7 +14,7 @@ public class AdapterMassiveList extends AdapterMassiveX<MassiveList<?>>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterMassiveList i = new AdapterMassiveList();
|
private static final AdapterMassiveList i = new AdapterMassiveList();
|
||||||
public static AdapterMassiveList get() { return i; }
|
public static AdapterMassiveList get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -14,7 +14,7 @@ public class AdapterMassiveMap extends AdapterMassiveX<MassiveMap<?, ?>>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterMassiveMap i = new AdapterMassiveMap();
|
private static final AdapterMassiveMap i = new AdapterMassiveMap();
|
||||||
public static AdapterMassiveMap get() { return i; }
|
public static AdapterMassiveMap get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -14,7 +14,7 @@ public class AdapterMassiveSet extends AdapterMassiveX<MassiveSet<?>>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterMassiveSet i = new AdapterMassiveSet();
|
private static final AdapterMassiveSet i = new AdapterMassiveSet();
|
||||||
public static AdapterMassiveSet get() { return i; }
|
public static AdapterMassiveSet get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -14,7 +14,7 @@ public class AdapterMassiveTreeMap extends AdapterMassiveX<MassiveTreeMap<?, ?,
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterMassiveTreeMap i = new AdapterMassiveTreeMap();
|
private static final AdapterMassiveTreeMap i = new AdapterMassiveTreeMap();
|
||||||
public static AdapterMassiveTreeMap get() { return i; }
|
public static AdapterMassiveTreeMap get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -14,7 +14,7 @@ public class AdapterMassiveTreeSet extends AdapterMassiveX<MassiveTreeSet<?, ?>>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterMassiveTreeSet i = new AdapterMassiveTreeSet();
|
private static final AdapterMassiveTreeSet i = new AdapterMassiveTreeSet();
|
||||||
public static AdapterMassiveTreeSet get() { return i; }
|
public static AdapterMassiveTreeSet get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -17,9 +17,8 @@ public class AdapterMson implements JsonDeserializer<Mson>, JsonSerializer<Mson>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterMson i = new AdapterMson();
|
private static final AdapterMson i = new AdapterMson();
|
||||||
public static AdapterMson get() { return i; }
|
public static AdapterMson get() { return i; }
|
||||||
public AdapterMson() {}
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
||||||
|
@ -17,9 +17,8 @@ public class AdapterMsonEvent implements JsonDeserializer<MsonEvent>, JsonSerial
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterMsonEvent i = new AdapterMsonEvent();
|
private static final AdapterMsonEvent i = new AdapterMsonEvent();
|
||||||
public static AdapterMsonEvent get() { return i; }
|
public static AdapterMsonEvent get() { return i; }
|
||||||
public AdapterMsonEvent() {}
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
||||||
|
@ -17,7 +17,7 @@ public class AdapterPlayerInventory implements JsonDeserializer<PlayerInventory>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterPlayerInventory i = new AdapterPlayerInventory();
|
private static final AdapterPlayerInventory i = new AdapterPlayerInventory();
|
||||||
public static AdapterPlayerInventory get() { return i; }
|
public static AdapterPlayerInventory get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -19,9 +19,8 @@ public class AdapterSound implements JsonDeserializer<Sound>, JsonSerializer<Sou
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AdapterSound i = new AdapterSound();
|
private static final AdapterSound i = new AdapterSound();
|
||||||
public static AdapterSound get() { return i; }
|
public static AdapterSound get() { return i; }
|
||||||
public AdapterSound() {}
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
||||||
|
@ -17,7 +17,7 @@ public class AdapterUUID implements JsonDeserializer<UUID>, JsonSerializer<UUID>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static AdapterUUID i = new AdapterUUID();
|
private static final AdapterUUID i = new AdapterUUID();
|
||||||
public static AdapterUUID get() { return i; }
|
public static AdapterUUID get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user