Class Pattern

java.lang.Object
org.bukkit.block.banner.Pattern
All Implemented Interfaces:
ConfigurationSerializable

public class Pattern extends Object implements ConfigurationSerializable
  • Constructor Details

    • Pattern

      public Pattern(@NotNull @NotNull DyeColor color, @NotNull @NotNull PatternType pattern)
      Creates a new pattern from the specified color and pattern type
      Parameters:
      color - the pattern color
      pattern - the pattern type
    • Pattern

      public Pattern(@NotNull @NotNull Map<String,Object> map)
      Constructor for deserialization.
      Parameters:
      map - the map to deserialize from
  • Method Details

    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Description copied from interface: ConfigurationSerializable
      Creates a Map representation of this class.

      This class must provide a method to restore this class, as defined in the ConfigurationSerializable interface javadocs. nb: It is not intended for this method to be called directly, this will be called by the ConfigurationSerialization class.

      Specified by:
      serialize in interface ConfigurationSerializable
      Returns:
      Map containing the current state of this class
    • getColor

      @NotNull public @NotNull DyeColor getColor()
      Returns the color of the pattern
      Returns:
      the color of the pattern
    • getPattern

      @NotNull public @NotNull PatternType getPattern()
      Returns the type of pattern
      Returns:
      the pattern type
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object