Class PlayerHandleAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<PlayerHandleAssert,@Nullable PlayerHandle>
nl.pim16aap2.lightkeeper.framework.assertions.PlayerHandleAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<PlayerHandleAssert,,PlayerHandle> org.assertj.core.api.Descriptable<PlayerHandleAssert>,org.assertj.core.api.ExtensionPoints<PlayerHandleAssert,PlayerHandle>
public final class PlayerHandleAssert
extends org.assertj.core.api.AbstractAssert<PlayerHandleAssert,@Nullable PlayerHandle>
Assertions for synthetic player state.
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
info, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescriptionorg.assertj.core.api.ListAssert<ChatComponentSnapshot> doesNotHaveItemInInventory(String materialKey) Asserts that the player does not have an item with the specified material in their inventory.Asserts that the player currently has no actionable menu open, without waiting.doesNotHavePermission(String permission) Asserts that the player's current effective Bukkit permissions do not grant the node.hasClickableChatText(String expectedText) Asserts that at least one captured chat component contains clickable text matching the fragment.hasItemInInventory(String materialKey) Asserts that the player has an item with the specified material in their inventory.Asserts that the player has the expected name.Asserts that the player currently has an actionable menu open.hasPermission(String permission) Asserts that the player's current effective Bukkit permissions grant the node.receivedMessage(String expectedFragment) Asserts that at least one received message contains the requested text fragment.org.assertj.core.api.ListAssert<String> org.assertj.core.api.AbstractStringAssert<?> Returns an AssertJ string assertion over all received messages concatenated into one text block.Methods inherited from class org.assertj.core.api.AbstractAssert
actual, asInstanceOf, asList, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
inventory
- Returns:
- Frozen assertions over the current inventory; recreate navigation when retrying.
-
receivedMessages
- Returns:
- Frozen individual-message assertions for exact contents, order, counts and predicates.
-
chatComponents
- Returns:
- Frozen component-list assertions; recreate navigation inside retries.
-
hasName
Asserts that the player has the expected name.- Parameters:
expectedName- Expected player name.- Returns:
- This assertion for fluent chaining.
-
hasPermission
Asserts that the player's current effective Bukkit permissions grant the node.- Parameters:
permission- Permission node; must not be blank.- Returns:
- This assertion for fluent chaining.
-
doesNotHavePermission
Asserts that the player's current effective Bukkit permissions do not grant the node.- Parameters:
permission- Permission node; must not be blank.- Returns:
- This assertion for fluent chaining.
-
hasOpenMenu
Asserts that the player currently has an actionable menu open.- Returns:
- This assertion for fluent chaining.
-
doesNotHaveOpenMenu
Asserts that the player currently has no actionable menu open, without waiting.- Returns:
- This assertion for fluent chaining.
-
hasItemInInventory
Asserts that the player has an item with the specified material in their inventory.- Parameters:
materialKey- Material key (e.g. "minecraft:stone").- Returns:
- This assertion for fluent chaining.
-
doesNotHaveItemInInventory
Asserts that the player does not have an item with the specified material in their inventory.- Parameters:
materialKey- Material key (e.g. "minecraft:stone").- Returns:
- This assertion for fluent chaining.
-
receivedMessage
Asserts that at least one received message contains the requested text fragment.- Parameters:
expectedFragment- Required message fragment.- Returns:
- This assertion for fluent chaining.
-
hasClickableChatText
Asserts that at least one captured chat component contains clickable text matching the fragment.- Parameters:
expectedText- Required text fragment that should be clickable.- Returns:
- This assertion for fluent chaining.
-
receivedMessagesText
public org.assertj.core.api.AbstractStringAssert<?> receivedMessagesText()Returns an AssertJ string assertion over all received messages concatenated into one text block.- Returns:
- AssertJ string assertion.
-