Interface PlayerPostEffects


@NullMarked public interface PlayerPostEffects
Represents the post-effects that can be applied to a player.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(Key effect)
    Adds a post-effect to the player.
    boolean
    Clears all post-effects from the player.
    boolean
    remove(Key effect)
    Removes a post-effect from the player.
    boolean
    set(SequencedCollection<Key> postEffects)
    Sets the list of post-effects that are currently applied to the player.
    Gets the list of post-effects that are currently applied to the player.
  • Method Details

    • values

      Gets the list of post-effects that are currently applied to the player.
      Returns:
      an unmodifiable list of post-effects
    • set

      boolean set(SequencedCollection<Key> postEffects)
      Sets the list of post-effects that are currently applied to the player.
      Parameters:
      postEffects - the list of post-effects to set
      Returns:
      true if the post-effects were changed, false if they were the same
    • add

      boolean add(Key effect)
      Adds a post-effect to the player.
      Parameters:
      effect - the key post-effect to add
      Returns:
      true if the post-effect was added, false if it was already present
    • remove

      boolean remove(Key effect)
      Removes a post-effect from the player.
      Parameters:
      effect - the key post-effect to remove
      Returns:
      true if the post-effect was removed, false if it was not present
    • clear

      boolean clear()
      Clears all post-effects from the player.
      Returns:
      true if any post-effects were cleared, false if there were none