Class OptionalLineInserter<RECEIVER>

  • All Implemented Interfaces:
    java.lang.Comparable<ContentInserter<RECEIVER>>

    public class OptionalLineInserter<RECEIVER>
    extends ContentInserter<RECEIVER>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static @NotNull java.util.regex.Pattern OPTIONAL_PATTERN
      Used to match the message which can be inserted
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected @Nullable java.lang.String extractID​(@NotNull java.util.regex.Matcher matcher)  
      protected @NotNull java.util.List<java.lang.String> get​(RECEIVER receiver, @NotNull java.util.regex.Matcher matcher, @NotNull Insertable<RECEIVER,​?> insertion)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OPTIONAL_PATTERN

        @NotNull
        public static final @NotNull java.util.regex.Pattern OPTIONAL_PATTERN
        Used to match the message which can be inserted

        format:
        - ?[id]Message content
        example:

        • ?[click]Click to use this item!
    • Constructor Detail

      • OptionalLineInserter

        public OptionalLineInserter​(int priority)
    • Method Detail

      • extractID

        @Nullable
        protected @Nullable java.lang.String extractID​(@NotNull
                                                       @NotNull java.util.regex.Matcher matcher)
        Specified by:
        extractID in class ContentInserter<RECEIVER>
      • get

        @NotNull
        protected @NotNull java.util.List<java.lang.String> get​(@Nullable
                                                                RECEIVER receiver,
                                                                @NotNull
                                                                @NotNull java.util.regex.Matcher matcher,
                                                                @NotNull
                                                                @NotNull Insertable<RECEIVER,​?> insertion)
        Specified by:
        get in class ContentInserter<RECEIVER>