Class EntityTag

    • Field Detail

    • Constructor Detail

      • EntityTag

        public EntityTag​(String tag)
      • EntityTag

        public EntityTag​(String tag,
                         boolean weak)
    • Method Detail

      • matchesAny

        public static boolean matchesAny​(EntityTag tag1,
                                         String tags)
      • matchesAny

        public static boolean matchesAny​(EntityTag tag1,
                                         String tags,
                                         boolean weak)
      • matchesAny

        public static boolean matchesAny​(String tag1,
                                         String tags)
      • matchesAny

        public static boolean matchesAny​(String tag1,
                                         String tags,
                                         boolean weak)
      • matchesAny

        public static boolean matchesAny​(EntityTag tag1,
                                         EntityTag[] tags,
                                         boolean weak)
      • matches

        public static boolean matches​(String tag1,
                                      String tag2)
      • matches

        public static boolean matches​(EntityTag tag1,
                                      String tag2)
      • isWild

        public boolean isWild()
      • getTag

        public String getTag()
      • isWeak

        public boolean isWeak()
      • hashCode

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

        public static EntityTag generate​(String... material)
        Utility method for generating ETags. Works by concatenating the UTF-8 bytes of the provided strings then generating an MD5 hash of the result.
      • matches

        public static boolean matches​(EntityTag etag,
                                      String... material)
        Checks that the passed in ETag matches the ETag generated by the generate method
      • toString

        public static String toString​(String... tags)