de.eldoria.jacksonbukkit.serializer.ComponentGsonSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paper Show documentation
Show all versions of paper Show documentation
Module for serialization on Paper based servers
The newest version!
/*
* SPDX-License-Identifier: MIT
*
* Copyright (C) EldoriaRPG Team and Contributor
*/
package de.eldoria.jacksonbukkit.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.Map;
/**
* Class for serialization of {@link Component} using {@link MiniMessage}.
*/
public class ComponentGsonSerializer extends JsonSerializer {
private static final Type MAP_TYPE = new TypeToken
© 2015 - 2025 Weber Informatics LLC | Privacy Policy