Interface Criteria
While this class outlines constants for standard criteria, see statistic(Statistic)
(and its overloads) to create instances for statistically-backed criteria.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Criteria
Mirrors the player's air supply (0 for no air, 300 for maximum air).static final Criteria
Mirrors the player's armor points (0 for no armor, 20 for maximum armor).static final Criteria
Increments automatically when a player dies.static final Criteria
The dummy criteria.static final Criteria
Mirrors the player's food points (0 for no food, 20 for maximum food).static final Criteria
Mirrors the player's health points (0 for no health, 20 for maximum default health).static final Criteria
Increments automatically when a player is killed by a player on the aqua team.static final Criteria
Increments automatically when a player is killed by a player on the black team.static final Criteria
Increments automatically when a player is killed by a player on the blue team.static final Criteria
Increments automatically when a player is killed by a player on the dark aqua team.static final Criteria
Increments automatically when a player is killed by a player on the dark blue team.static final Criteria
Increments automatically when a player is killed by a player on the dark gray team.static final Criteria
Increments automatically when a player is killed by a player on the dark green team.static final Criteria
Increments automatically when a player is killed by a player on the dark purple team.static final Criteria
Increments automatically when a player is killed by a player on the dark red team.static final Criteria
Increments automatically when a player is killed by a player on the gold team.static final Criteria
Increments automatically when a player is killed by a player on the gray team.static final Criteria
Increments automatically when a player is killed by a player on the green team.static final Criteria
Increments automatically when a player is killed by a player on the light purple team.static final Criteria
Increments automatically when a player is killed by a player on the red team.static final Criteria
Increments automatically when a player is killed by a player on the white team.static final Criteria
Increments automatically when a player is killed by a player on the yellow team.static final Criteria
Mirrors the player's experience level.static final Criteria
Increments automatically when a player kills another player.static final Criteria
Increments automatically when a player kills another player on the aqua team.static final Criteria
Increments automatically when a player kills another player on the black team.static final Criteria
Increments automatically when a player kills another player on the blue team.static final Criteria
Increments automatically when a player kills another player on the dark aqua team.static final Criteria
Increments automatically when a player kills another player on the dark blue team.static final Criteria
Increments automatically when a player kills another player on the dark gray team.static final Criteria
Increments automatically when a player kills another player on the dark green team.static final Criteria
Increments automatically when a player kills another player on the dark purple team.static final Criteria
Increments automatically when a player kills another player on the dark red team.static final Criteria
Increments automatically when a player kills another player on the gold team.static final Criteria
Increments automatically when a player kills another player on the gray team.static final Criteria
Increments automatically when a player kills another player on the green team.static final Criteria
Increments automatically when a player kills another player on the light purple team.static final Criteria
Increments automatically when a player kills another player on the red team.static final Criteria
Increments automatically when a player kills another player on the white team.static final Criteria
Increments automatically when a player kills another player on the yellow team.static final Criteria
Increments automatically when a player kills another living entity.static final Criteria
The trigger criteria.static final Criteria
Mirrors the player's experience points. -
Method Summary
Modifier and TypeMethodDescriptionstatic Criteria
Get (or create) a newCriteria
by its name.Get theRenderType
used by default for this criteria.getName()
Get the name of this criteria (its unique id).boolean
Get whether or not this criteria is read only.static Criteria
Get aCriteria
for the specified statistic.static Criteria
statistic
(Statistic statistic, EntityType entityType) Get aCriteria
for the specified statistic pertaining to an entity type.static Criteria
Get aCriteria
for the specified statistic pertaining to blocks or items.
-
Field Details
-
DUMMY
The dummy criteria. Not changed by the server. -
TRIGGER
The trigger criteria. Changed when a player runs the /trigger command for an objective. -
DEATH_COUNT
Increments automatically when a player dies. -
PLAYER_KILL_COUNT
Increments automatically when a player kills another player. -
TOTAL_KILL_COUNT
Increments automatically when a player kills another living entity. -
HEALTH
Mirrors the player's health points (0 for no health, 20 for maximum default health). -
FOOD
Mirrors the player's food points (0 for no food, 20 for maximum food). -
AIR
Mirrors the player's air supply (0 for no air, 300 for maximum air). -
ARMOR
Mirrors the player's armor points (0 for no armor, 20 for maximum armor). -
XP
Mirrors the player's experience points. -
LEVEL
Mirrors the player's experience level. -
TEAM_KILL_BLACK
Increments automatically when a player kills another player on the black team. -
TEAM_KILL_DARK_BLUE
Increments automatically when a player kills another player on the dark blue team. -
TEAM_KILL_DARK_GREEN
Increments automatically when a player kills another player on the dark green team. -
TEAM_KILL_DARK_AQUA
Increments automatically when a player kills another player on the dark aqua team. -
TEAM_KILL_DARK_RED
Increments automatically when a player kills another player on the dark red team. -
TEAM_KILL_DARK_PURPLE
Increments automatically when a player kills another player on the dark purple team. -
TEAM_KILL_GOLD
Increments automatically when a player kills another player on the gold team. -
TEAM_KILL_GRAY
Increments automatically when a player kills another player on the gray team. -
TEAM_KILL_DARK_GRAY
Increments automatically when a player kills another player on the dark gray team. -
TEAM_KILL_BLUE
Increments automatically when a player kills another player on the blue team. -
TEAM_KILL_GREEN
Increments automatically when a player kills another player on the green team. -
TEAM_KILL_AQUA
Increments automatically when a player kills another player on the aqua team. -
TEAM_KILL_RED
Increments automatically when a player kills another player on the red team. -
TEAM_KILL_LIGHT_PURPLE
Increments automatically when a player kills another player on the light purple team. -
TEAM_KILL_YELLOW
Increments automatically when a player kills another player on the yellow team. -
TEAM_KILL_WHITE
Increments automatically when a player kills another player on the white team. -
KILLED_BY_TEAM_BLACK
Increments automatically when a player is killed by a player on the black team. -
KILLED_BY_TEAM_DARK_BLUE
Increments automatically when a player is killed by a player on the dark blue team. -
KILLED_BY_TEAM_DARK_GREEN
Increments automatically when a player is killed by a player on the dark green team. -
KILLED_BY_TEAM_DARK_AQUA
Increments automatically when a player is killed by a player on the dark aqua team. -
KILLED_BY_TEAM_DARK_RED
Increments automatically when a player is killed by a player on the dark red team. -
KILLED_BY_TEAM_DARK_PURPLE
Increments automatically when a player is killed by a player on the dark purple team. -
KILLED_BY_TEAM_GOLD
Increments automatically when a player is killed by a player on the gold team. -
KILLED_BY_TEAM_GRAY
Increments automatically when a player is killed by a player on the gray team. -
KILLED_BY_TEAM_DARK_GRAY
Increments automatically when a player is killed by a player on the dark gray team. -
KILLED_BY_TEAM_BLUE
Increments automatically when a player is killed by a player on the blue team. -
KILLED_BY_TEAM_GREEN
Increments automatically when a player is killed by a player on the green team. -
KILLED_BY_TEAM_AQUA
Increments automatically when a player is killed by a player on the aqua team. -
KILLED_BY_TEAM_RED
Increments automatically when a player is killed by a player on the red team. -
KILLED_BY_TEAM_LIGHT_PURPLE
Increments automatically when a player is killed by a player on the light purple team. -
KILLED_BY_TEAM_YELLOW
Increments automatically when a player is killed by a player on the yellow team. -
KILLED_BY_TEAM_WHITE
Increments automatically when a player is killed by a player on the white team.
-
-
Method Details
-
getName
Get the name of this criteria (its unique id).- Returns:
- the name
-
isReadOnly
boolean isReadOnly()Get whether or not this criteria is read only. If read only, scoreboards with this criteria cannot have their scores changed.- Returns:
- true if read only, false otherwise
-
getDefaultRenderType
Get theRenderType
used by default for this criteria.- Returns:
- the default render type
-
statistic
Get aCriteria
for the specified statistic pertaining to blocks or items.This method expects a
Statistic
ofStatistic.Type.BLOCK
orStatistic.Type.ITEM
and theMaterial
matching said type (e.g. BLOCK statistics require materials whereMaterial.isBlock()
is true). This acts as a convenience to create more complex compound criteria such as those that increment on block breaks, or item uses. An example would beCriteria.statistic(Statistic.CRAFT_ITEM, Material.STICK)
, returning a Criteria representing "minecraft.crafted:minecraft.stick" which will increment when the player crafts a stick.If the provided statistic does not require additional data,
statistic(Statistic)
is called and returned instead.This method provides no guarantee that any given criteria exists on the vanilla server.
- Parameters:
statistic
- the statistic for which to get a criteriamaterial
- the relevant material- Returns:
- the criteria
- Throws:
IllegalArgumentException
- ifStatistic.getType()
is anything other thanStatistic.Type.BLOCK
orStatistic.Type.ITEM
IllegalArgumentException
- ifStatistic.getType()
isStatistic.Type.BLOCK
, butMaterial.isBlock()
is falseIllegalArgumentException
- ifStatistic.getType()
isStatistic.Type.ITEM
, butMaterial.isItem()
is false
-
statistic
Get aCriteria
for the specified statistic pertaining to an entity type.This method expects a
Statistic
ofStatistic.Type.ENTITY
. This acts as a convenience to create more complex compound criteria such as being killed by a specific entity type. An example would beCriteria.statistic(Statistic.KILL_ENTITY, EntityType.CREEPER)
, returning a Criteria representing "minecraft.killed:minecraft.creeper" which will increment when the player kills a creepers.If the provided statistic does not require additional data,
statistic(Statistic)
is called and returned instead.This method provides no guarantee that any given criteria exists on the vanilla server.
- Parameters:
statistic
- the statistic for which to get a criteriaentityType
- the relevant entity type- Returns:
- the criteria
- Throws:
IllegalArgumentException
- ifStatistic.getType()
is notStatistic.Type.ENTITY
-
statistic
Get aCriteria
for the specified statistic.An example would be
Criteria.statistic(Statistic.FLY_ONE_CM)
, returning a Criteria representing "minecraft.custom:minecraft.aviate_one_cm" which will increment when the player flies with an elytra.This method provides no guarantee that any given criteria exists on the vanilla server. All statistics are accepted, however some may not operate as expected if additional data is required. For block/item-related statistics, see
statistic(Statistic, Material)
, and for entity-related statistics, seestatistic(Statistic, EntityType)
- Parameters:
statistic
- the statistic for which to get a criteria- Returns:
- the criteria
-
create
Get (or create) a newCriteria
by its name.- Parameters:
name
- the criteria name- Returns:
- the created criteria
-