Class EntityLocationMatcher

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

public class EntityLocationMatcher extends org.hamcrest.TypeSafeMatcher<EntityMock>
  • Constructor Details

    • EntityLocationMatcher

      public EntityLocationMatcher(Location location, double radius)
  • Method Details

    • matchesSafely

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

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

      protected void describeMismatchSafely(EntityMock entityMock, org.hamcrest.Description description)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<EntityMock>
    • isInLocation

      @NotNull public static @NotNull EntityLocationMatcher isInLocation(@NotNull @NotNull Location location, double maxDistance)
      Parameters:
      location - The location required for a match
      maxDistance - The radius away from the location which gives a match
      Returns:
      A matcher which matches with any entity within a radius of specified location
    • isNotInLocation

      @NotNull public static @NotNull org.hamcrest.Matcher<EntityMock> isNotInLocation(@NotNull @NotNull Location location, double maxDistance)
      Parameters:
      location - The location required for no match
      maxDistance - The radius away from the location which withdraws a match
      Returns:
      A matcher which matches with any entity outside a radius of specified location