Class BaseTag<T extends Keyed,C extends BaseTag<T,C>>

java.lang.Object
io.papermc.paper.tag.BaseTag<T,C>
All Implemented Interfaces:
Keyed, Keyed, Tag<T>
Direct Known Subclasses:
EntitySetTag, MaterialSetTag

public abstract class BaseTag<T extends Keyed,C extends BaseTag<T,C>> extends Object implements Tag<T>
  • Field Details

  • Constructor Details

  • Method Details

    • lock

      @NotNull public C lock()
    • isLocked

      public boolean isLocked()
    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key
    • getValues

      @NotNull public @NotNull Set<T> getValues()
      Description copied from interface: Tag
      Gets an immutable set of all tagged items.
      Specified by:
      getValues in interface Tag<T extends Keyed>
      Returns:
      set of tagged items
    • isTagged

      public boolean isTagged(@NotNull T item)
      Description copied from interface: Tag
      Returns whether or not this tag has an entry for the specified item.
      Specified by:
      isTagged in interface Tag<T extends Keyed>
      Parameters:
      item - to check
      Returns:
      if it is tagged
    • add

      @NotNull public C add(@NotNull @NotNull Tag<T>... tags)
    • add

      @NotNull public C add(@NotNull T... values)
    • add

      @NotNull public C add(@NotNull @NotNull Collection<T> collection)
    • add

      @NotNull public C add(@NotNull @NotNull Predicate<T> filter)
    • contains

      @NotNull public C contains(@NotNull @NotNull String with)
    • endsWith

      @NotNull public C endsWith(@NotNull @NotNull String with)
    • startsWith

      @NotNull public C startsWith(@NotNull @NotNull String with)
    • not

      @NotNull public C not(@NotNull @NotNull Tag<T>... tags)
    • not

      @NotNull public C not(@NotNull T... values)
    • not

      @NotNull public C not(@NotNull @NotNull Collection<T> values)
    • not

      @NotNull public C not(@NotNull @NotNull Predicate<T> filter)
    • notContains

      @NotNull public C notContains(@NotNull @NotNull String with)
    • notEndsWith

      @NotNull public C notEndsWith(@NotNull @NotNull String with)
    • notStartsWith

      @NotNull public C notStartsWith(@NotNull @NotNull String with)
    • ensureSize

      @NotNull public C ensureSize(@NotNull @NotNull String label, int size)
    • getAllPossibleValues

      @NotNull @Internal protected abstract @NotNull Set<T> getAllPossibleValues()
    • getName

      @NotNull @Internal protected abstract @NotNull String getName(@NotNull T value)