Class BukkitTagSource<T extends org.bukkit.Keyed>

java.lang.Object
org.skriptlang.skript.bukkit.tags.sources.TagSource<T>
org.skriptlang.skript.bukkit.tags.sources.BukkitTagSource<T>
Type Parameters:
T - The class of the tags of this source.

public class BukkitTagSource<T extends org.bukkit.Keyed> extends TagSource<T>
A set of tags provided by Bukkit.
  • Constructor Details

    • BukkitTagSource

      public BukkitTagSource(String registry, TagType<T> type)
      Parameters:
      registry - The name of the registry to use. For example, Tag.REGISTRY_ITEMS.
      type - The type of tag this represents. To continue the example, TagType.ITEMS.
  • Method Details

    • getAllTags

      @NotNull public @NotNull Iterable<org.bukkit.Tag<T>> getAllTags()
      Specified by:
      getAllTags in class TagSource<T extends org.bukkit.Keyed>
      Returns:
      All the tags associated with this source.
    • getTag

      @Nullable public @Nullable org.bukkit.Tag<T> getTag(org.bukkit.NamespacedKey key)
      Description copied from class: TagSource
      Gets a specific tag by the key.
      Specified by:
      getTag in class TagSource<T extends org.bukkit.Keyed>
      Parameters:
      key - The key to use to find the tag.
      Returns:
      The tag associated with the key. Null if no such tag exists.