Interface TagReadable

All Known Subinterfaces:
Block, ChunkSnapshot, CommandSender, EntitySnapshot, InstanceSnapshot, ItemStack, PlayerSnapshot, Taggable, TagHandler, TagWritable
All Known Implementing Classes:
AbstractInventory, AnvilInventory, BeaconInventory, BrewingStandInventory, Chunk, ConsoleSender, CustomData, Damage, DynamicChunk, EnchantmentTableInventory, Entity, EntityCreature, EntityDamage, EntityProjectile, EntityProjectileDamage, ExperienceOrb, FurnaceInventory, Instance, InstanceContainer, Inventory, ItemEntity, LightingChunk, LivingEntity, Player, PlayerInventory, PlayerProjectile, PositionalDamage, ServerSender, SharedInstance, SnapshotImpl.Chunk, SnapshotImpl.Entity, SnapshotImpl.Instance, SnapshotImpl.Player, VillagerInventory

public interface TagReadable
Represents an element which can read tags.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> @UnknownNullability T
    getTag(@NotNull Tag<T> tag)
    Reads the specified tag.
    default boolean
    hasTag(@NotNull Tag<?> tag)
    Returns if a tag is present.
  • Method Details

    • getTag

      <T> @UnknownNullability T getTag(@NotNull @NotNull Tag<T> tag)
      Reads the specified tag.
      Type Parameters:
      T - the tag type
      Parameters:
      tag - the tag to read
      Returns:
      the read tag, null if not present
    • hasTag

      default boolean hasTag(@NotNull @NotNull Tag<?> tag)
      Returns if a tag is present.
      Parameters:
      tag - the tag to check
      Returns:
      true if the tag is present, false otherwise