Scoreboard Tags (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.3

Syntax

[(all [[of] the]|the)] scoreboard tags of %entities%

Description

Scoreboard tags are simple list of texts stored directly in the data of an <a href='#entity'>entity</a>. So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit <a href='https://minecraft.wiki/w/Scoreboard#Tags'>visit Minecraft Wiki</a> for more info. This is changeable and valid for any type of entity. Also you can use use the <a href='#CondHasScoreboardTag'>Has Scoreboard Tag</a> condition to check whether an entity has the given tags.

Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).

Examples

on spawn of a monster:
	if the spawn reason is mob spawner:
		add "spawned by a spawner" to the scoreboard tags of event-entity

on death of a monster:
	if the attacker is a player:
		if the victim doesn't have the scoreboard tag "spawned by a spawner":
			add 1$ to attacker's balance

View source