Tag (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.10

Syntax

[minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tag %strings%

Description

Represents a tag which can be used to classify items, blocks, or entities. Tags are composed of a value and an optional namespace: "minecraft:oak_logs". If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, `tag "doors"` will be the tag "minecraft:doors", while `paper tag "doors"` will be "paper:doors". `minecraft tag` will search through the vanilla tags, `datapack tag` will search for datapack-provided tags (a namespace is required here!), `paper tag` will search for Paper's custom tags if you are running Paper, and `custom tag` will look in the "skript" namespace for custom tags you've registered. You can also filter by tag types using "item", "block", or "entity".

Examples

minecraft tag "dirt" # minecraft:dirt
paper tag "doors" # paper:doors
tag "skript:custom_dirt" # skript:custom_dirt
custom tag "dirt" # skript:dirt
datapack block tag "dirt" # minecraft:dirt
datapack tag "my_pack:custom_dirt" # my_pack:custom_dirt
tag "minecraft:mineable/pickaxe" # minecraft:mineable/pickaxe
custom item tag "blood_magic_sk/can_sacrifice_with" # skript:blood_magic_sk/can_sacrifice_with

View source