Class ItemMetaLoreMatcher

java.lang.Object
org.hamcrest.BaseMatcher<ItemMetaMock>
org.hamcrest.TypeSafeMatcher<ItemMetaMock>
org.mockbukkit.mockbukkit.matcher.inventory.meta.ItemMetaLoreMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<ItemMetaMock>, org.hamcrest.SelfDescribing

public class ItemMetaLoreMatcher extends org.hamcrest.TypeSafeMatcher<ItemMetaMock>
  • Constructor Details

    • ItemMetaLoreMatcher

      public ItemMetaLoreMatcher(List<? extends net.kyori.adventure.text.Component> targetLore)
  • Method Details

    • matchesSafely

      protected boolean matchesSafely(ItemMetaMock itemMetaMock)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<ItemMetaMock>
    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • describeMismatchSafely

      protected void describeMismatchSafely(ItemMetaMock itemMeta, org.hamcrest.Description description)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<ItemMetaMock>
    • hasLore

      public static ItemMetaLoreMatcher hasLore(String... legacyLoreItems)
      Parameters:
      legacyLoreItems - The lore required for there to be a match
      Returns:
      A matcher which matches with any item meta with the specified lore
    • doesNotHaveLore

      public static org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(String... legacyLoreItems)
      Parameters:
      legacyLoreItems - The lore required for there to be no match
      Returns:
      A matcher which matches with any item meta without the specified lore
    • hasLore

      public static ItemMetaLoreMatcher hasLore(net.kyori.adventure.text.Component... loreItems)
      Parameters:
      loreItems - The lore required for there to be a match
      Returns:
      A matcher which matches with any item meta with the specified lore
    • doesNotHaveLore

      public static org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(net.kyori.adventure.text.Component... loreItems)
      Parameters:
      loreItems - The lore required for there to be no match
      Returns:
      A matcher which matches with any item meta without the specified lore
    • hasLore

      @NotNull public static @NotNull ItemMetaLoreMatcher hasLore(List<net.kyori.adventure.text.Component> lore)
      Parameters:
      lore - The lore required for there to be a match
      Returns:
      A matcher which matches with any item meta with the specified lore
    • doesNotHaveLore

      @NotNull public static @NotNull org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(List<net.kyori.adventure.text.Component> lore)
      Parameters:
      lore - The lore required for there to be no match
      Returns:
      A matcher which matches with any item meta without the specified lore