diff --git a/src/main/java/de/bluecolored/bluenbt/BlueNBT.java b/src/main/java/de/bluecolored/bluenbt/BlueNBT.java index 258d95b..1e438c9 100644 --- a/src/main/java/de/bluecolored/bluenbt/BlueNBT.java +++ b/src/main/java/de/bluecolored/bluenbt/BlueNBT.java @@ -165,7 +165,7 @@ public Optional> create(TypeToken createType @SuppressWarnings("unchecked") public TypeSerializer getTypeSerializer(TypeToken type) { TypeSerializer serializer = (TypeSerializer) typeSerializerMap.get(type); - if (serializer != null) return serializer; + if (serializer != null && (!(serializer instanceof FutureTypeSerializer))) return serializer; synchronized (this) { serializer = (TypeSerializer) typeSerializerMap.get(type); @@ -196,7 +196,7 @@ public TypeSerializer getTypeSerializer(TypeToken type) { @SuppressWarnings("unchecked") public TypeDeserializer getTypeDeserializer(TypeToken type) { TypeDeserializer deserializer = (TypeDeserializer) typeDeserializerMap.get(type); - if (deserializer != null) return deserializer; + if (deserializer != null && (!(deserializer instanceof FutureTypeDeserializer))) return deserializer; synchronized (this) { deserializer = (TypeDeserializer) typeDeserializerMap.get(type); @@ -227,7 +227,7 @@ public TypeDeserializer getTypeDeserializer(TypeToken type) { @SuppressWarnings("unchecked") public InstanceCreator getInstanceCreator(TypeToken type) { InstanceCreator instanceCreator = (InstanceCreator) instanceCreatorMap.get(type); - if (instanceCreator != null) return instanceCreator; + if (instanceCreator != null && (!(instanceCreator instanceof FutureInstanceCreator))) return instanceCreator; synchronized (this) { instanceCreator = (InstanceCreator) instanceCreatorMap.get(type);