Class BukkitConverters
java.lang.Object
com.ultikits.ultitools.config.convert.builtin.BukkitConverters
Bukkit-owned serialization and world identity, without inspecting server implementation fields.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConfigConverter<org.bukkit.configuration.serialization.ConfigurationSerializable> Fallback after registered hierarchy and generic factories, not an ordinary hierarchy entry.static final ConfigConverter<org.bukkit.World> Converter for the Bukkit world-name contract. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Objecthydrate(Object plain, ConverterRegistry.Context ctx) hydrateValues(Map<?, ?> plain, ConverterRegistry.Context ctx) private static voidwidenVectorCoordinates(Map<String, Object> values, Object alias) Bukkit'sVector#deserialize(andBlockVector's, Bukkit 1.21.11) casts each coordinate toDouble, 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).
-
Field Details
-
WORLD
Converter for the Bukkit world-name contract. -
SERIALIZABLE
public static final ConfigConverter<org.bukkit.configuration.serialization.ConfigurationSerializable> SERIALIZABLEFallback after registered hierarchy and generic factories, not an ordinary hierarchy entry.
-
-
Constructor Details
-
BukkitConverters
private BukkitConverters()
-
-
Method Details
-
widenVectorCoordinates
Bukkit'sVector#deserialize(andBlockVector's, Bukkit 1.21.11) casts each coordinate toDouble, 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 coordinatesx,yandzof aVector(or subclass) are widened todoublein 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 asInteger). -
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
-