Class BukkitConverters

java.lang.Object
com.ultikits.ultitools.config.convert.builtin.BukkitConverters

@Internal public final class BukkitConverters extends Object
Bukkit-owned serialization and world identity, without inspecting server implementation fields.
  • Field Details

    • WORLD

      public static final ConfigConverter<org.bukkit.World> WORLD
      Converter for the Bukkit world-name contract.
    • SERIALIZABLE

      public static final ConfigConverter<org.bukkit.configuration.serialization.ConfigurationSerializable> SERIALIZABLE
      Fallback after registered hierarchy and generic factories, not an ordinary hierarchy entry.
  • Constructor Details

    • BukkitConverters

      private BukkitConverters()
  • Method Details

    • widenVectorCoordinates

      private static void widenVectorCoordinates(Map<String,Object> values, Object alias)
      Bukkit's Vector#deserialize (and BlockVector's, Bukkit 1.21.11) casts each coordinate to Double, so a whole number an operator wrote (y: 64) failed with a ClassCastException that Bukkit logs at SEVERE, and the module ran on its declared default (17-66 review round 1 R66-W1, #609). The coordinates x, y and z of a Vector (or subclass) are widened to double in this in-memory copy only: the file is never touched, so the operator's text stays as written, and no other serializable type is widened (several Bukkit types read their numbers as Integer).
    • hydrateValues

      private static Map<String,Object> hydrateValues(Map<?,?> plain, ConverterRegistry.Context ctx) throws ConversionException
      Throws:
      ConversionException
    • hydrate

      private static Object hydrate(Object plain, ConverterRegistry.Context ctx) throws ConversionException
      Throws:
      ConversionException