Skip to content

Commit

Permalink
Fix import and export of challenges. Added Tag TypeAdapter from BBox
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Feb 15, 2025
1 parent d405390 commit 23dae37
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.json.BentoboxTypeAdapterFactory;
import world.bentobox.bentobox.database.json.adapters.TagTypeAdapterFactory;
import world.bentobox.bentobox.database.objects.DataObject;
import world.bentobox.bentobox.util.ItemParser;
import world.bentobox.bentobox.util.Util;
Expand Down Expand Up @@ -1147,6 +1148,7 @@ private static final class DefaultJSONHandler
GsonBuilder builder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().enableComplexMapKeySerialization();
// Register adapters
builder.registerTypeAdapterFactory(new BentoboxTypeAdapterFactory(addon.getPlugin()));
builder.registerTypeAdapterFactory(new TagTypeAdapterFactory());
// Keep null in the database
builder.serializeNulls();
// Allow characters like < or > without escaping them
Expand Down

0 comments on commit 23dae37

Please sign in to comment.