Class ColorSerializer

java.lang.Object
me.deecaad.core.file.serializers.ColorSerializer
All Implemented Interfaces:
Serializer<org.bukkit.Color>, SimpleSerializer<org.bukkit.Color>

public class ColorSerializer extends Object implements SimpleSerializer<org.bukkit.Color>
  • Constructor Details

    • ColorSerializer

      public ColorSerializer()
  • Method Details

    • getTypeName

      @NotNull public @NotNull String getTypeName()
      Description copied from interface: SimpleSerializer
      The name of the type of the serializer. This is used for error messages.
      Specified by:
      getTypeName in interface SimpleSerializer<org.bukkit.Color>
    • deserialize

      @NotNull public @NotNull org.bukkit.Color deserialize(@NotNull @NotNull String data, @NotNull @NotNull String errorLocation) throws me.deecaad.core.file.SerializerException
      Description copied from interface: SimpleSerializer
      Parses an object from a string.
      Specified by:
      deserialize in interface SimpleSerializer<org.bukkit.Color>
      Parameters:
      data - The string to parse.
      errorLocation - The location of the error in the file.
      Returns:
      The parsed object.
      Throws:
      me.deecaad.core.file.SerializerException
    • examples

      @NotNull public @NotNull List<String> examples()
      Description copied from interface: SimpleSerializer
      Returns the set of all possible values that can be parsed by this serializer.

      The set of values will always be finite. Thus, any type that can take on an infinite number of values (like a double) will return a finite set of example values.

      Specified by:
      examples in interface SimpleSerializer<org.bukkit.Color>
      Returns:
      The set of all possible values that can be parsed by this serializer.