Class EntityTeleportationMatcher

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

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

    • EntityTeleportationMatcher

      public EntityTeleportationMatcher(Location location, double maximumDistance)
  • 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

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

      public static EntityTeleportationMatcher hasTeleported()
      Returns:
      A matcher which matches if the entity has teleported
    • hasTeleported

      @NotNull public static @NotNull EntityTeleportationMatcher hasTeleported(@NotNull @NotNull Location location)
      Parameters:
      location - The location required for there to be a match
      Returns:
      A matcher which matches if the entity has teleported to the specified location
    • hasTeleported

      @NotNull public static @NotNull EntityTeleportationMatcher hasTeleported(@NotNull @NotNull Location location, double maximumDistance)
      Parameters:
      location - The location required for there to be a match
      maximumDistance - The distance around the location considered a valid match
      Returns:
      A matcher which matches if the entity has teleported to the specified location within a radius
    • hasNotTeleported

      public static org.hamcrest.Matcher<EntityMock> hasNotTeleported()
      Returns:
      A matcher which matches if the entity has not teleported
    • hasNotTeleported

      @NotNull public static @NotNull org.hamcrest.Matcher<EntityMock> hasNotTeleported(@NotNull @NotNull Location location)
      Parameters:
      location - The location required for there to be no match
      Returns:
      A matcher which matches if the entity has not teleported to the specified location
    • hasNotTeleported

      @NotNull public static @NotNull org.hamcrest.Matcher<EntityMock> hasNotTeleported(@NotNull @NotNull Location location, double maximumDistance)
      Parameters:
      location - The location required for there to be no match
      maximumDistance - The distance around the location considered no valid match
      Returns:
      A matcher which matches if the entity has teleported outside a radius of the specified location