Interface Contextual

    • Method Detail

      • identifier

        String identifier()
        Returns the identifier associated with this Contextual.

        The identifier of each distinct Contextual within a collection of contextuals should be unique.

        Not guaranteed to be human-readable. Use friendlyIdentifier() for a more readable alternative.

        The identifier for this subject
      • friendlyIdentifier

        default Optional<String> friendlyIdentifier()
        Returns the friendly identifier associated with this Contextual.

        Unlike identifier(), this value is not guaranteed to be unique.

        If the friendly identifier is equal to the normal identifier, this method should return Optional.empty().

        Contextuals which represent a ServerPlayer or a User should return the username here, if available.

        The friendly identifier for this contextual
      • contextCause

        default Cause contextCause()
        Get the cause describing the current state of this subject.

        This is often not based on current game state, but rather the last known state of this subject. If a subject refers to a game object that is not active in the world, the cause may be a global cause.

        the active cause