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 Type
    Method
    Description
    org.assertj.core.api.ListAssert<ChatComponentSnapshot>
     
    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.
    Asserts that the player's current effective Bukkit permissions do not grant the node.
    Asserts that at least one captured chat component contains clickable text matching the fragment.
    Asserts that the player has an item with the specified material in their inventory.
    hasName(String expectedName)
    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, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Method Details

    • inventory

      public InventoryAssert inventory()
      Returns:
      Frozen assertions over the current inventory; recreate navigation when retrying.
    • receivedMessages

      public org.assertj.core.api.ListAssert<String> receivedMessages()
      Returns:
      Frozen individual-message assertions for exact contents, order, counts and predicates.
    • chatComponents

      public org.assertj.core.api.ListAssert<ChatComponentSnapshot> chatComponents()
      Returns:
      Frozen component-list assertions; recreate navigation inside retries.
    • hasName

      public PlayerHandleAssert hasName(String expectedName)
      Asserts that the player has the expected name.
      Parameters:
      expectedName - Expected player name.
      Returns:
      This assertion for fluent chaining.
    • hasPermission

      public PlayerHandleAssert hasPermission(String permission)
      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

      public PlayerHandleAssert doesNotHavePermission(String permission)
      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

      public PlayerHandleAssert hasOpenMenu()
      Asserts that the player currently has an actionable menu open.
      Returns:
      This assertion for fluent chaining.
    • doesNotHaveOpenMenu

      public PlayerHandleAssert doesNotHaveOpenMenu()
      Asserts that the player currently has no actionable menu open, without waiting.
      Returns:
      This assertion for fluent chaining.
    • hasItemInInventory

      public PlayerHandleAssert hasItemInInventory(String materialKey)
      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

      public PlayerHandleAssert doesNotHaveItemInInventory(String materialKey)
      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

      public PlayerHandleAssert receivedMessage(String expectedFragment)
      Asserts that at least one received message contains the requested text fragment.
      Parameters:
      expectedFragment - Required message fragment.
      Returns:
      This assertion for fluent chaining.
    • hasClickableChatText

      public PlayerHandleAssert hasClickableChatText(String expectedText)
      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.