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
-
Constructor Summary
ConstructorsConstructorDescriptionItemMetaLoreMatcher(List<? extends net.kyori.adventure.text.Component> targetLore) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddescribeMismatchSafely(ItemMetaMock itemMeta, org.hamcrest.Description description) voiddescribeTo(org.hamcrest.Description description) static org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(String... legacyLoreItems) static @NotNull org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(List<net.kyori.adventure.text.Component> lore) static org.hamcrest.Matcher<ItemMetaMock> doesNotHaveLore(net.kyori.adventure.text.Component... loreItems) static ItemMetaLoreMatcherstatic @NotNull ItemMetaLoreMatcherstatic ItemMetaLoreMatcherhasLore(net.kyori.adventure.text.Component... loreItems) protected booleanmatchesSafely(ItemMetaMock itemMetaMock) Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
ItemMetaLoreMatcher
-
-
Method Details
-
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeMatcher<ItemMetaMock>
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatchSafely
- Overrides:
describeMismatchSafelyin classorg.hamcrest.TypeSafeMatcher<ItemMetaMock>
-
hasLore
- 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
- 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
- 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
-