Class RangedEntityAttackMatcher
java.lang.Object
org.hamcrest.BaseMatcher<MockRangedEntity<? extends MobMock>>
org.hamcrest.TypeSafeMatcher<MockRangedEntity<? extends MobMock>>
org.mockbukkit.mockbukkit.matcher.entity.ranged.RangedEntityAttackMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<MockRangedEntity<? extends MobMock>>,org.hamcrest.SelfDescribing
public class RangedEntityAttackMatcher
extends org.hamcrest.TypeSafeMatcher<MockRangedEntity<? extends MobMock>>
-
Constructor Summary
ConstructorsConstructorDescriptionRangedEntityAttackMatcher(LivingEntity target, float charge, boolean aggressive) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddescribeMismatchSafely(MockRangedEntity<? extends MobMock> mockRangedEntity, org.hamcrest.Description description) voiddescribeTo(org.hamcrest.Description description) static @NotNull RangedEntityAttackMatcherhasAttacked(@NotNull LivingEntity target, float charge) static @NotNull RangedEntityAttackMatcherhasAttacked(@NotNull LivingEntity target, float charge, boolean aggressive) static @NotNull org.hamcrest.Matcher<MockRangedEntity<? extends MobMock>> hasNotAttacked(@NotNull LivingEntity target, float charge) static @NotNull org.hamcrest.Matcher<MockRangedEntity<? extends MobMock>> hasNotAttacked(@NotNull LivingEntity target, float charge, boolean aggressive) protected booleanmatchesSafely(MockRangedEntity<? extends MobMock> mockRangedEntity) 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
-
RangedEntityAttackMatcher
-
-
Method Details
-
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeMatcher<MockRangedEntity<? extends MobMock>>
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatchSafely
protected void describeMismatchSafely(MockRangedEntity<? extends MobMock> mockRangedEntity, org.hamcrest.Description description) - Overrides:
describeMismatchSafelyin classorg.hamcrest.TypeSafeMatcher<MockRangedEntity<? extends MobMock>>
-
hasAttacked
@NotNull public static @NotNull RangedEntityAttackMatcher hasAttacked(@NotNull @NotNull LivingEntity target, float charge) - Parameters:
target- The required targetcharge- The required charge- Returns:
- A matcher which matches with any ranged entity that has attacked the specified target with the specified charge
-
hasAttacked
@NotNull public static @NotNull RangedEntityAttackMatcher hasAttacked(@NotNull @NotNull LivingEntity target, float charge, boolean aggressive) - Parameters:
target- The required targetcharge- The required chargeaggressive- Whether a check for aggressiveness should be done- Returns:
- A matcher which matches with any ranged entity that has attacked the specified target with the specified charge while being aggressive
-
hasNotAttacked
@NotNull public static @NotNull org.hamcrest.Matcher<MockRangedEntity<? extends MobMock>> hasNotAttacked(@NotNull @NotNull LivingEntity target, float charge) - Parameters:
target- The required target for no matchcharge- The required charge for no match- Returns:
- A matcher which matches with any ranged entity that has not attacked the specified target with the specified charge
-
hasNotAttacked
@NotNull public static @NotNull org.hamcrest.Matcher<MockRangedEntity<? extends MobMock>> hasNotAttacked(@NotNull @NotNull LivingEntity target, float charge, boolean aggressive) - Parameters:
target- The required target for no matchcharge- The required charge for no matchaggressive- Whether a check for aggressiveness should be done- Returns:
- A matcher which matches with any ranged entity that has not attacked the specified target with the specified charge while being aggressive
-