Interface Emitable

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Emitable
Something that holds data representable as MiniMessage tags.
Since:
4.10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    emit(TokenEmitter emitter)
    Emit tags based on this emitable's data.
    default @Nullable Component
    Provide a substitute for this component's actual children.
  • Method Details

    • emit

      void emit(TokenEmitter emitter)
      Emit tags based on this emitable's data.
      Parameters:
      emitter - the target to emit to
      Since:
      4.10.0
    • substitute

      default @Nullable Component substitute()
      Provide a substitute for this component's actual children.

      This allows modifying tags to output original data while still transforming the created components.

      Returns:
      a potential substitute
      Since:
      4.13.0