Interface Criteria
 While this class outlines constants for standard criteria, see statistic(Statistic)
 (and its overloads) to create instances for statistically-backed criteria.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final CriteriaMirrors the player's air supply (0 for no air, 300 for maximum air).static final CriteriaMirrors the player's armor points (0 for no armor, 20 for maximum armor).static final CriteriaIncrements automatically when a player dies.static final CriteriaThe dummy criteria.static final CriteriaMirrors the player's food points (0 for no food, 20 for maximum food).static final CriteriaMirrors the player's health points (0 for no health, 20 for maximum default health).static final CriteriaIncrements automatically when a player is killed by a player on the aqua team.static final CriteriaIncrements automatically when a player is killed by a player on the black team.static final CriteriaIncrements automatically when a player is killed by a player on the blue team.static final CriteriaIncrements automatically when a player is killed by a player on the dark aqua team.static final CriteriaIncrements automatically when a player is killed by a player on the dark blue team.static final CriteriaIncrements automatically when a player is killed by a player on the dark gray team.static final CriteriaIncrements automatically when a player is killed by a player on the dark green team.static final CriteriaIncrements automatically when a player is killed by a player on the dark purple team.static final CriteriaIncrements automatically when a player is killed by a player on the dark red team.static final CriteriaIncrements automatically when a player is killed by a player on the gold team.static final CriteriaIncrements automatically when a player is killed by a player on the gray team.static final CriteriaIncrements automatically when a player is killed by a player on the green team.static final CriteriaIncrements automatically when a player is killed by a player on the light purple team.static final CriteriaIncrements automatically when a player is killed by a player on the red team.static final CriteriaIncrements automatically when a player is killed by a player on the white team.static final CriteriaIncrements automatically when a player is killed by a player on the yellow team.static final CriteriaMirrors the player's experience level.static final CriteriaIncrements automatically when a player kills another player.static final CriteriaIncrements automatically when a player kills another player on the aqua team.static final CriteriaIncrements automatically when a player kills another player on the black team.static final CriteriaIncrements automatically when a player kills another player on the blue team.static final CriteriaIncrements automatically when a player kills another player on the dark aqua team.static final CriteriaIncrements automatically when a player kills another player on the dark blue team.static final CriteriaIncrements automatically when a player kills another player on the dark gray team.static final CriteriaIncrements automatically when a player kills another player on the dark green team.static final CriteriaIncrements automatically when a player kills another player on the dark purple team.static final CriteriaIncrements automatically when a player kills another player on the dark red team.static final CriteriaIncrements automatically when a player kills another player on the gold team.static final CriteriaIncrements automatically when a player kills another player on the gray team.static final CriteriaIncrements automatically when a player kills another player on the green team.static final CriteriaIncrements automatically when a player kills another player on the light purple team.static final CriteriaIncrements automatically when a player kills another player on the red team.static final CriteriaIncrements automatically when a player kills another player on the white team.static final CriteriaIncrements automatically when a player kills another player on the yellow team.static final CriteriaIncrements automatically when a player kills another living entity.static final CriteriaThe trigger criteria.static final CriteriaMirrors the player's experience points.
- 
Method SummaryModifier and TypeMethodDescriptionGet (or create) a newCriteriaby its name.Get theRenderTypeused by default for this criteria.getName()Get the name of this criteria (its unique id).booleanGet whether or not this criteria is read only.Get aCriteriafor the specified statistic.Get aCriteriafor the specified statistic pertaining to blocks or items.statistic(@NotNull Statistic statistic, @NotNull EntityType entityType) Get aCriteriafor the specified statistic pertaining to an entity type.
- 
Field Details- 
DUMMYThe dummy criteria. Not changed by the server.
- 
TRIGGERThe trigger criteria. Changed when a player runs the /trigger command for an objective.
- 
DEATH_COUNTIncrements automatically when a player dies.
- 
PLAYER_KILL_COUNTIncrements automatically when a player kills another player.
- 
TOTAL_KILL_COUNTIncrements automatically when a player kills another living entity.
- 
HEALTHMirrors the player's health points (0 for no health, 20 for maximum default health).
- 
FOODMirrors the player's food points (0 for no food, 20 for maximum food).
- 
AIRMirrors the player's air supply (0 for no air, 300 for maximum air).
- 
ARMORMirrors the player's armor points (0 for no armor, 20 for maximum armor).
- 
XPMirrors the player's experience points.
- 
LEVELMirrors the player's experience level.
- 
TEAM_KILL_BLACKIncrements automatically when a player kills another player on the black team.
- 
TEAM_KILL_DARK_BLUEIncrements automatically when a player kills another player on the dark blue team.
- 
TEAM_KILL_DARK_GREENIncrements automatically when a player kills another player on the dark green team.
- 
TEAM_KILL_DARK_AQUAIncrements automatically when a player kills another player on the dark aqua team.
- 
TEAM_KILL_DARK_REDIncrements automatically when a player kills another player on the dark red team.
- 
TEAM_KILL_DARK_PURPLEIncrements automatically when a player kills another player on the dark purple team.
- 
TEAM_KILL_GOLDIncrements automatically when a player kills another player on the gold team.
- 
TEAM_KILL_GRAYIncrements automatically when a player kills another player on the gray team.
- 
TEAM_KILL_DARK_GRAYIncrements automatically when a player kills another player on the dark gray team.
- 
TEAM_KILL_BLUEIncrements automatically when a player kills another player on the blue team.
- 
TEAM_KILL_GREENIncrements automatically when a player kills another player on the green team.
- 
TEAM_KILL_AQUAIncrements automatically when a player kills another player on the aqua team.
- 
TEAM_KILL_REDIncrements automatically when a player kills another player on the red team.
- 
TEAM_KILL_LIGHT_PURPLEIncrements automatically when a player kills another player on the light purple team.
- 
TEAM_KILL_YELLOWIncrements automatically when a player kills another player on the yellow team.
- 
TEAM_KILL_WHITEIncrements automatically when a player kills another player on the white team.
- 
KILLED_BY_TEAM_BLACKIncrements automatically when a player is killed by a player on the black team.
- 
KILLED_BY_TEAM_DARK_BLUEIncrements automatically when a player is killed by a player on the dark blue team.
- 
KILLED_BY_TEAM_DARK_GREENIncrements automatically when a player is killed by a player on the dark green team.
- 
KILLED_BY_TEAM_DARK_AQUAIncrements automatically when a player is killed by a player on the dark aqua team.
- 
KILLED_BY_TEAM_DARK_REDIncrements automatically when a player is killed by a player on the dark red team.
- 
KILLED_BY_TEAM_DARK_PURPLEIncrements automatically when a player is killed by a player on the dark purple team.
- 
KILLED_BY_TEAM_GOLDIncrements automatically when a player is killed by a player on the gold team.
- 
KILLED_BY_TEAM_GRAYIncrements automatically when a player is killed by a player on the gray team.
- 
KILLED_BY_TEAM_DARK_GRAYIncrements automatically when a player is killed by a player on the dark gray team.
- 
KILLED_BY_TEAM_BLUEIncrements automatically when a player is killed by a player on the blue team.
- 
KILLED_BY_TEAM_GREENIncrements automatically when a player is killed by a player on the green team.
- 
KILLED_BY_TEAM_AQUAIncrements automatically when a player is killed by a player on the aqua team.
- 
KILLED_BY_TEAM_REDIncrements automatically when a player is killed by a player on the red team.
- 
KILLED_BY_TEAM_LIGHT_PURPLEIncrements automatically when a player is killed by a player on the light purple team.
- 
KILLED_BY_TEAM_YELLOWIncrements automatically when a player is killed by a player on the yellow team.
- 
KILLED_BY_TEAM_WHITEIncrements automatically when a player is killed by a player on the white team.
 
- 
- 
Method Details- 
getNameGet the name of this criteria (its unique id).- Returns:
- the name
 
- 
isReadOnlyboolean 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
 
- 
getDefaultRenderTypeGet theRenderTypeused by default for this criteria.- Returns:
- the default render type
 
- 
statistic@NotNull static @NotNull Criteria statistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material) Get aCriteriafor the specified statistic pertaining to blocks or items.This method expects a StatisticofStatistic.Type.BLOCKorStatistic.Type.ITEMand theMaterialmatching 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 criteria
- material- the relevant material
- Returns:
- the criteria
- Throws:
- IllegalArgumentException- if- Statistic.getType()is anything other than- Statistic.Type.BLOCKor- Statistic.Type.ITEM
- IllegalArgumentException- if- Statistic.getType()is- Statistic.Type.BLOCK, but- Material.isBlock()is false
- IllegalArgumentException- if- Statistic.getType()is- Statistic.Type.ITEM, but- Material.isItem()is false
 
- 
statistic@NotNull static @NotNull Criteria statistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType) Get aCriteriafor the specified statistic pertaining to an entity type.This method expects a StatisticofStatistic.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 criteria
- entityType- the relevant entity type
- Returns:
- the criteria
- Throws:
- IllegalArgumentException- if- Statistic.getType()is not- Statistic.Type.ENTITY
 
- 
statisticGet aCriteriafor 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
 
- 
createGet (or create) a newCriteriaby its name.- Parameters:
- name- the criteria name
- Returns:
- the created criteria
 
 
-