Class MessageTargetReceivedMessageMatcher

java.lang.Object
org.hamcrest.BaseMatcher<MessageTarget>
org.hamcrest.TypeSafeMatcher<MessageTarget>
org.mockbukkit.mockbukkit.matcher.command.MessageTargetReceivedMessageMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<MessageTarget>, org.hamcrest.SelfDescribing

public class MessageTargetReceivedMessageMatcher extends org.hamcrest.TypeSafeMatcher<MessageTarget>
  • Constructor Details

    • MessageTargetReceivedMessageMatcher

      public MessageTargetReceivedMessageMatcher(net.kyori.adventure.text.Component expected)
  • Method Details

    • matchesSafely

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

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

      protected void describeMismatchSafely(MessageTarget messageTarget, org.hamcrest.Description description)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<MessageTarget>
    • hasReceived

      @NotNull public static @NotNull MessageTargetReceivedMessageMatcher hasReceived(@NotNull @NotNull net.kyori.adventure.text.Component expected)
      Parameters:
      expected - The message required for a match
      Returns:
      A matcher which matches with any message target that has received the specified message
    • hasReceived

      @NotNull public static @NotNull MessageTargetReceivedMessageMatcher hasReceived(@NotNull @NotNull String expected)
      Parameters:
      expected - The message required for a match
      Returns:
      A matcher which matches with any message target that has received the specified message
    • hasNotReceived

      @NotNull public static @NotNull org.hamcrest.Matcher<MessageTarget> hasNotReceived(@NotNull @NotNull String expected)
      Parameters:
      expected - The message required for a match
      Returns:
      A matcher which matches with any message target that has not received the specified message