Skip to content


Idofront adds serializers for many data types


Create a serializable class with kotlinx.serialization, then set the serializer for the property you need:

class Something(
    @Serializable(with = LocationSerializer::class)
    val location: Location

Or declare the serializer once at the top of the file:



class Data(
    val uuid: UUID

List of supported classes

  • Recipes (through wrapper classes SerializableRecipe and subclasses of SerializableRecipeIngredients)
  • BossBar
  • ItemStack (full support, not meant for user readability, see SerializableItemStack below)
  • Location
  • Component (via MiniMessageSerializer)
  • PotionEffect
  • UUID
  • Vector
  • World
  • Kotlin Duration (see below)


Lets you define items cleanly in config, then convert them to a bukkit ItemStack. Also supports Looty prefabs.


Example YML from using SerializableRecipe

  key: "plugin:some_recipe"
    - !<shaped>
        G: # SerializableItemStack
          type: GLASS
          type: COMPASS
      configuration: |-
        | G |
        | G |
  result: # SerializableItemStack
    type: COMPASS
    displayName: Fancy Compass
  # group: (optional) 

Many other ingredient types exist such as shapeless, cooking, smoking, campfire, etc...

Range serializers

Ex. IntRangeSerializer, all of them let you define a range in the form of start..end or start to end, ex 1..4. Writing a single number like 1 results in a range equivalent to 1..1


Durations are serialized as a number followed by a timescale (ex 1s for one second.) We also add a extension functions for durations in ticks: 1.ticks and Duration.inWholeTicks.

Supported timescales:

t: Ticks
s: Seconds
m: Minutes
h: Hours
d: Days
w: Weeks
mo: Months