Package de.eldoria.jacksonbukkit
Class JacksonPaper
java.lang.Object
com.fasterxml.jackson.databind.Module
de.eldoria.jacksonbukkit.JacksonBukkitModule
de.eldoria.jacksonbukkit.JacksonPaper
- All Implemented Interfaces:
Versioned
Class adding support for classes implementing
ConfigurationSerializable
.
Vector
BlockVector
Color
ItemStack
PotionEffect
FireworkEffect
Pattern
BoundingBox
AttributeModifier
Location
It also provides some additional serialization for:
NamespacedKey
OfflinePlayer
Component
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module
Module.SetupContext
-
Field Summary
Fields inherited from class de.eldoria.jacksonbukkit.JacksonBukkitModule
hexColors
-
Constructor Summary
ConstructorDescriptionCreate a new JacksonPaper module.JacksonPaper
(boolean hexColors, boolean legacyItemStackSerialization, @Nullable JsonDeserializer<net.kyori.adventure.text.Component> componentDeserializer, @Nullable JsonSerializer<net.kyori.adventure.text.Component> componentSerializer) Create a new JacksonPaper module. -
Method Summary
Modifier and TypeMethodDescriptionstatic JacksonPaperBuilder
builder()
Get a new builder to create aJacksonPaper
module.protected void
registerDeserializer
(SimpleDeserializers deserializers) Register deserializers of the inheriting class.protected void
registerSerializer
(SimpleSerializers serializers) Register serializer of the inheriting classMethods inherited from class de.eldoria.jacksonbukkit.JacksonBukkitModule
addDeserializer, addSerializer, setupModule, version
Methods inherited from class com.fasterxml.jackson.databind.Module
getDependencies, getTypeId
-
Constructor Details
-
JacksonPaper
@Internal public JacksonPaper(boolean hexColors, boolean legacyItemStackSerialization, @Nullable @Nullable JsonDeserializer<net.kyori.adventure.text.Component> componentDeserializer, @Nullable @Nullable JsonSerializer<net.kyori.adventure.text.Component> componentSerializer) Create a new JacksonPaper module.- Parameters:
hexColors
- true to serialize colors as hex by defaultlegacyItemStackSerialization
- true to use spigot based serialization
-
JacksonPaper
Create a new JacksonPaper module.
-
-
Method Details
-
builder
Get a new builder to create aJacksonPaper
module.- Returns:
- builder instance
-
getModuleName
- Specified by:
getModuleName
in classJacksonBukkitModule
-
registerSerializer
Description copied from class:JacksonBukkitModule
Register serializer of the inheriting classWill be called after default serializer were registered.
- Specified by:
registerSerializer
in classJacksonBukkitModule
- Parameters:
serializers
- serializers
-
registerDeserializer
Description copied from class:JacksonBukkitModule
Register deserializers of the inheriting class.Will be called after default deserializer were registered.
- Specified by:
registerDeserializer
in classJacksonBukkitModule
- Parameters:
deserializers
- deserializers
-