Condition list

List of all natively available conditions

Contents

Currently, the plugin natively supports the following conditions:

  • compare [ Compare two values ]

  • permission [ Whether a player has specified permissions ]

  • op [ Whether a player is opped ]

  • gamemode [ Whether the players gamemode is among specified ones ]

  • location [ Whether the players location matches the given location ]

  • incuboid [ Whether a player is in a cuboid ]

  • standingon [ Which type of block the player is standing on ]

  • sneaking [ Whether the player is sneaking ]

  • world [ Which world the player is in ]

  • day [ Whether its day in the players world ]

  • night [ Whether its night in the players world ]

  • time [ What time is it in the players world ]

  • lookingatblock [ What type of block the player is looking at ]

  • lookingatfurniture [ If player is looking at plugin furniture ] *1

  • lookingatentity [ If player is looking at an entity ]

  • entitynbtequals [ Check nbt values of the entity that is being looked at ] *2

  • tileentitynbtequals [ Check nbt values of the tile entity that is being looked at ] *2

  • blocknbtequals [ Check nbt values of the block that is being looked at ] *2

  • blockstateequals [ Check blockstate values of the block that is being looked at ]

  • lookingatcitizen [ Whether player is looking at a Citizens NPC ] *4

  • lookingatmythicmob [Whether player is looking at a MythicMob mob] *5

  • equipped [ If a player has the item equipped in hands or on body ]

  • itemnbtequals [ If players equipped item has given nbt data ] *2

  • region [ If players region is among specified ones ] *3

Notes:

  1. Requires a supported furniture plugin

  2. Requires NBT API plugin

  3. Requires a region plugin

  4. Requires Citizens

  5. Requires MythicMobs

Conditions

compare

Argument
Type
Example

1, first

String (supports placeholders)

%player_name%

2, second

String (supports placeholders)

%player_health%

o, oper, operation (optional)

Context
Description

compare.first

Parsed value of the "first" argument

compare.second

Parsed value of the "second" argument

Description

If only first is set and it's a boolean, will check if it's true

If both first and second are set and they are strings, they will be compared if they are equal. If they are booleans (true / false) they will be also compared if they are equal.

If operation is set and both first & second arguments are numbers, will use the operation to compare the variables.

Examples

permission

Argument
Type
Example

p, perm, permission

String array

tooltips.command.reload

Description

Checks if player has any of the permissions in the string array

Examples

op

Description

Checks if player is opped

Examples

gamemode

Argument
Type
Example

gamemode, gm

Type of gamemode array

creative, survival

Description

Checks if player has any of the given gamemodes

Examples

location

Argument
Type
Example

location, loc, l

Array of Location

[ 22, 602, -234] or [22, 602, -234], [22, 603, -233]

Description

Checks if player is at the given coordinates in their current world

Examples

incuboid

Argument
Type
Example

first, 1, firstpoint

[ 22, 602, -234]

second, 2, secondpoint

[49, 620, -251]

Description

This check is more resource-intensive than the "region" condition, due to being unable to cache which cuboid the player is currently in.

Checks if player is within the two given locations.

Examples

standingon

Argument
Type
Example

type, m, mat, material

Type of material array

grass_block, obsidian

Description

Checks if player is currently standing on any of the given materials. Can also be air to check if the block under the player is air.

Examples

sneaking

Description

Checks if player is currently sneaking

Examples

world

Argument
Type
Example

name

String array

world, resource_world

Context
Description

world

Returns the world name

Description

Checks if players world is any of the ones defined in the name string array.

Examples

day

Description

Checks if its day (time between 0 and 13000) in the players current world.

Examples

night

Description

Checks if its night (time between 13000 and 24000) in the players current world.

Examples

time

Argument
Type
Example

time, t

1000, 13000

o, oper, operation (optional)

>=

Description

Checks if the current time in the players world is equal to the given time argument.

If operation is included, a comparison operation is conducted, with given time argument being the first comparable.

Examples

lookingatblock

Argument
Type
Example

type, m, mat, material (optional)

Type of material array

bedrock, grass_block

location, loc, l (optional)

Array of Location

[0, 64, 50]

distance, d (optional)

3, 5

Description

If no type or location is given, will return true if any type of block is being looked at.

If type is defined, will check if the block that is being looked at is of specific material

If location is defined, will check if the block that is being looked at is at specific coordinates in the players current world

If distance is defined (3 by default), will increase or decrease the distance at which the block that is being looked at is detected

Examples

lookingatfurniture

Argument
Type
Example

id (optional)

String array

couch, chair

distance, d (optional)

3, 5

Context
Description

furniture.id

ID of target furniture

furniture.name

Name of the furniture as defined in the config of the plugin

furniture.plugin

The plugin where this furniture came from

Description

Requires any supported furniture plugin to work.

If no ids are given, checks if player is looking at any furniture within the distance (3 by default).

If ids are given, checks if the furniture the player is looking at has any of the ids.

Distance argument increases the distance at which furniture is checked.

Examples

lookingatentity

Argument
Type
Example

entity, type, t (optional)

Type of entity type array

villager, sheep

distance, dist, d (optional)

3, 5

Description

If no types are given, checks if player is looking at any type of entity (armor stands etc. too)

If types are given, checks if player is looking at any of the given entity types

If distance is given, will increase the distance that entities are checked at (3 by default)

Examples

entitynbtequals

Argument
Type
Example

key, k

mynbtkey

nbtvalue, nbtval, value, val, v

weird, 10, false

distance, dist, d (optional)

3, 5

Description

Requires NBT API plugin to work.

Checks if the targeted entity within distance (3 by default) has a key with given value

Supports basic NBT paths as key. Example: Item.tag.CustomModelData

Examples

tileentitynbtequals

Argument
Type
Example

key, k

mynbtkey

nbtvalue, nbtval, value, val, v

weird, 10, false

distance, dist, d (optional)

3, 5

Description

Requires NBT API plugin to work.

Checks if the targeted tile entity within distance (3 by default) has a key with given value

Supports basic NBT paths as key. Example: Item.tag.CustomModelData

Examples

blocknbtequals

Argument
Type
Example

key, k

mynbtkey

nbtvalue, nbtval, value, val, v

weird, 10, false

distance, dist, d (optional)

3, 5

Description

Requires NBT API plugin to work.

Checks if the targeted block within distance (3 by default) has a key with given value

Supports basic NBT paths as key. Example: Item.tag.CustomModelData

Examples

blockstateequals

Argument
Type
Example

key, k, id

note, powered

value, val, v

weird, 10, false

distance, dist, d (optional)

3, 5

Description

Checks if the targeted blocks block state within distance (3 by default) has a key with given value

Examples

lookingatcitizen

Argument
Type
Example

id, name (optional)

Integer array

0, 1, 5, 23

distance, dist, d (optional)

3, 5

Description

Requires Citizens plugin to work.

Checks if the targeted entity within distance (3 by default) is a Citizens NPC.

If ids are present, checks if the targeted NPC has any of the given ids.

Citizen ids can be seen by first selecting an NPC using commands and typing /npc:

Examples

lookingatmythicmob

Argument
Type
Example

id, ids (optional)

String array

john, spider

distance, dist, d (optional)

3, 5

Description

Requires MythicMobs plugin to work.

Checks if the targeted entity within distance (3 by default) is a MythicMobs mob

If ids are present, checks if the targeted mythic mob has any of the given ids.

Examples

equipped

Argument
Type
Example

type, m, mat, material

Type of material array

stone_axe, flint_and_steel

slot, s (optional)

hand, helmet

Description

Checks if item at the given slot (main hand by default) has the given type

Examples

itemnbtequals

Argument
Type
Example

key, k

mynbtkey

nbtvalue, nbtval, value, val, v

weird, 10, false

slot, s (optional)

off_hand, legs

Description

Requires NBT API plugin to work.

Checks if item at the given slot (main hand by default) has an item with the given nbt key with given nbt value in it. Supports basic NBT paths as keys. Example: Item.tag.CustomModelData

Examples

region

Argument
Type
Example

r, reg, region, name, id (optional)

String array

shop, spawn

Context
Description

region

Current region ID

Description

Requires any region plugin to work.

Checks if player is in any of the given region ids

If no regions are provided, returns true if player is inside of any region

Examples

Last updated