Class PlayerConsumeItemMatcher

java.lang.Object
org.hamcrest.BaseMatcher<PlayerMock>
org.hamcrest.TypeSafeMatcher<PlayerMock>
org.mockbukkit.mockbukkit.matcher.entity.player.PlayerConsumeItemMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<PlayerMock>, org.hamcrest.SelfDescribing

public class PlayerConsumeItemMatcher extends org.hamcrest.TypeSafeMatcher<PlayerMock>
  • Constructor Details

    • PlayerConsumeItemMatcher

      public PlayerConsumeItemMatcher(ItemStack itemStack)
  • Method Details

    • matchesSafely

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

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

      protected void describeMismatchSafely(PlayerMock playerMock, org.hamcrest.Description description)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<PlayerMock>
    • hasConsumed

      @NotNull public static @NotNull PlayerConsumeItemMatcher hasConsumed(@NotNull @NotNull ItemStack itemStack)
      Parameters:
      itemStack - The required item to have been consumed
      Returns:
      A matcher which matches with any player that has consumed the specified item
    • hasNotConsumed

      @NotNull public static @NotNull org.hamcrest.Matcher<PlayerMock> hasNotConsumed(@NotNull @NotNull ItemStack itemStack)
      Parameters:
      itemStack - The required item to not have been consumed
      Returns:
      A matcher which matches with any player that has not consumed the specified item