Package de.eldoria.jacksonbukkit.builder
Class ModuleBuilder<T,V extends JacksonBukkitModule>
java.lang.Object
de.eldoria.jacksonbukkit.builder.ModuleBuilder<T,V>
- Type Parameters:
T- type of builderV- type of created module
- Direct Known Subclasses:
JacksonBukkitBuilder,JacksonPaperBuilder
Base class for module builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether hex colors should be serialized as hex or not.protected NamespacedKeySerializer.Format -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Vbuild()Build the moduleSerializeColoras hex string.colorAsHex(boolean hexColors) SerializeColoras hex string.Define the format used for serializing namespaced keys.
-
Field Details
-
hexColors
protected boolean hexColorsWhether hex colors should be serialized as hex or not. -
namespacedKeyFormat
-
-
Constructor Details
-
ModuleBuilder
public ModuleBuilder()
-
-
Method Details
-
colorAsHex
SerializeColoras hex string.- Returns:
- builder instance
-
colorAsHex
SerializeColoras hex string.- Parameters:
hexColors- true to serialize colors as hex.- Returns:
- builder instance
-
withNamespacedKeyFormat
Define the format used for serializing namespaced keys. Every format can be deserialized, independent of this setting.- Returns:
- builder instance
-
build
Build the module- Returns:
- new module instance
-