Class Pattern

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

public class Pattern
extends java.lang.Object
implements ConfigurationSerializable
  • Constructor Summary

    Constructors 
    Constructor Description
    Pattern​(java.util.Map<java.lang.String,​java.lang.Object> map)
    Constructor for deserialization.
    Pattern​(DyeColor color, PatternType pattern)
    Creates a new pattern from the specified color and pattern type
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    DyeColor getColor()
    Returns the color of the pattern
    PatternType getPattern()
    Returns the type of pattern
    int hashCode()  
    java.util.Map<java.lang.String,​java.lang.Object> serialize()
    Creates a Map representation of this class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pattern

      public Pattern​(DyeColor color, 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​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Constructor for deserialization.
      Parameters:
      map - the map to deserialize from
  • Method Details

    • serialize

      public java.util.Map<java.lang.String,​java.lang.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.

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

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

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

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

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object