Objectives List๐
Action: action
๐
This objective completes when the player clicks on the given block type. The first argument is the type of the click,
it can be right, left or any. Next is a Block Selector or any
if you
want to count all clicks, even into the air. You can also specify the loc:
argument, followed by the standard location
format and the range:
followed by a number (or variable). The specified location is the center of a sphere, the range it's radius.
Therefore, these arguments define where the clicked block needs to be, as opposed to "where you must be" in location condition.
If you add the argument cancel
, the click will be canceled (chest will not open, button will not be pressed etc.).
This objective works great with the location condition and the item in hand condition to further limit the counted clicks.
One could make a magic wand using this.
The objective contains one property, location
. It's a string formatted like X: 100, Y: 200, Z:300
. It does not
show the radius.
Example
action right DOOR conditions:holding_key loc:100;200;300;world range:5
action any any conditions:holding_magicWand events:fireSpell #Custom click listener for a wand
Arrow Shooting: arrow
๐
To complete this objective the player needs to shoot the arrow into the target. There are two arguments, location of the target and precision number (radius around location where the arrow must land, should be small). Note that the position of an arrow after hit is on the wall of a full block, which means that shooting not full blocks (like heads) won't give accurate results. Experiment with this objective a bit to make sure you've set the numbers correctly.
Example
arrow 100.5;200.5;300.5;world 1.1 events:reward conditions:correct_player_position
Block: block
๐
To complete this objective the player must break or place the specified amount of blocks. The first argument is a
Block Selector. Next is amount. It can be more than 0 for placing and
less than 0 for destroying. You can also use the notify
keyword to display messages to the player each time he updates
amount of blocks, optionally with the notification interval after colon.
This objective has two properties, amount
and left
. Amount is current amount of blocks in the objective, left is
amount needed to complete the objective. Note that it may sometimes be negative!
Example
block LOG -16 events:reward notify:5
Breed animals: breed
๐
This objective is completed by breeding animals of specified type. The first argument is the
animal type and the second argument is the
amount (positive integer). You can add the notify
argument to display a message with the remaining amount each time
the animal is bred, optionally with the notification interval after a colon. While you can specify any entity, the
objective will be completable only for breedabgle ones.
Example
breed cow 10 notify:2 events:reward
Put items in a chest: chestput
๐
This objective requires the player to put specified items in a specified chest. First argument is a location of the
chest, second argument is a list of items (from items.yml file), separated with a comma. You can also add amount of
items after a colon. The items will be removed upon completing the objective unless you add items-stay
optional
argument.
Example
chestput 100;200;300;world emerald:5,sword events:tag,message
Eat/drink: consume
๐
This objective is completed by eating specified food or drinking specified potion. The only required argument is the ID of an item from items.yml.
Example
consume tawny_owl events:faster_endurance_regen
Crafting: craft
๐
To complete this objective the player must craft specified item. First argument is ID of the item, as in items.yml. Next is amount (integer).
The crafting objective has three properties: left
is the amount of items left to craft, amount
is the current amount of
already crafted items and total
is the initially required amount of items to be crafted.
Example
craft saddle 5 events:reward
Enchant item: enchant
๐
This objectie is completed when the player enchants specified item with specified enchantment. The first argument is an item name, as defined it items.yml. Second one is the enchantment and a level, separated with a colon. If you need to check for multiple enchantments you can add a list of them, separated by colons.
Example
enchant sword damage_all:1,knockback:1 events:reward
Experience: experience
๐
This objective can by completed by reaching specified amount of experience points. You can check for whole levels by
adding the level
argument. The conditions are checked when the player levels up, so if they are not met the first
time, the player will have to meet them and levelup again.
Example
experience 25 level events:reward
Delay: delay
๐
This objective is just a long, persistent delay for firing events. It will run only after certain amount of time
(measured in minutes) and only when player is online and meets all conditions. If a player is offline at that time it
will just wait for them to log in. You should use it for example to delete tags so the player can complete quests
multiple times. First argument is time, by default in minutes. You can also use ticks
or seconds
argument to use
different units, but keep in mind that it's not very precise - it will complete roughly after the time ends. To control
that precision you can specify an optional interval:
argument, which specifies how many ticks should pass between
checks. One second is 20 ticks. Less makes the objective more precise, at the expense of performance. The rest is
just like in other objectives.
Delay has two properties, left
and date
. The first one will show how much time needs to pass before the delay is
completed (i.e. 23 days, 5 hours and 45 minutes
), the second one will show a date of completing the objective
formatted using date_format
setting in config.yml (it will look like the one above every journal entry).
Example
delay 1000 ticks interval:5 events:event1,event2
Death: die
๐
Death objective completes when the player dies meeting all conditions. You can optionally cancel death with cancel
argument. It will heal player and optionally teleport him to respawn location. There can be two arguments: cancel
,
which is optional, and respawn:
, which is also optional and only used if there is the cancel
argument set. You can
add them right after type of objective.
Example
die cancel respawn:100;200;300;world;90;0 events:teleport
Fishing: fish
๐
Requires the player to catch something with the fishing rod. It doesn't have to be a fish, it can also be a treasure or
junk. The first argument is a Block Selector of the item to catch.
Second argument must be the amount of fish to catch. You can also add the notify
argument if you want to display
progress, optionally with the notification interval after a colon.
The fish objective has three properties: left
is the amount of fish still left to be caught, amount
is the amount of
already caught fish and total
is the initially required amount of fish needed to be caught.
Example
fish SALMON 5 notify events:tag_fish_caught
Interact with entity: interact
๐
The player must click on an entity to complete this objective. The first argument is the type of a click.
Available values are right
, left
and any
.
Second required argument is the mob type.
Next is an amount of mobs required to click on. These must be unique, so the player can't simply click twenty times on
the same zombie to complete it. There is also an optional name:
parameter which specifies what custom name the entity must have
(you need to write _
instead of the space character). To check for the real name (e.g. if you renamed players to include
their rank) you can also use realname:
instead.
Add marked:
if the clicked entity needs to be marked by the spawn
event (see its description for marking explanation).
You can also add notify
argument to make the objective notify players whenever they click a correct entity,
optionally with the notification interval after colon and cancel
if the click shouldn't do what it usually does
(i.e. left click won't hurt the entity). This can be limited with an optional loc
and range
attribute to limit within a range of a location.
Example
interact right creeper 1 marked:sick condition:syringeInHand cancel
Kill player: kill
๐
To complete this objective the player needs to kill another player. The first argument is amount of players to kill.
You can also specify additional arguments: name:
followed by the name will only accept killing players with this name,
required:
followed by a list of conditions separated with commas will only accept killing players meeting these conditions
and notify
will display notifications when a player is killed, optionally with the notification interval after a colon.
The kill objective has three properties: left
is the amount of players still left to kill, amount
is the amount of
already killed players and total
is the initially required amount to kill.
Example
kill 5 required:team_B
Location: location
๐
This objective completes when player moves in specified range of specified location and meets all conditions. The first argument after objective's name must be location, the second - radius around the location. It can be a variable.
Location objective contains one property, location
. It's a string formatted like X: 100, Y: 200, Z:300
.
Example
location 100;200;300;world 5 condition:test1,!test2 events:test1,test2
Login: login
๐
To complete this objective the player simply needs to login to the server.
If you use global
this objective will be also completed directly when the player joins the first time.
If you use persistent
it will be permanent.
Don't forget that if you use global and persistent you can still remove the objective explicitly.
Example
login events:welcome_message
Logout: logout
๐
To complete this objective the player simply needs to leave the server. Keep in mind that running a folder
event here
will make it run in "persistent" mode, since the player is offline on the next tick.
Example
logout events:delete_objective
Password: password
๐
This objective requires the player to write a certain password in chat. All attempts of a player will be hidden from public chat. The password consists of a prefix followed by the actual secret word:
Solution: The Cake is a lie!
^prefix ^secret word(s)
The objective's instruction string is defined as follows:
-
The first argument is the password, use underscore characters (
_
) instead of spaces. The password is a regular expression. They are a little complicated but worth the effort if you want more control over what exactly matches. Websites like regex101.com help with that complexity though. The offical documentation for regular expressions in Java might also help you. If you don't want to get into them just write down the password but keep in mind that the players answer needs to be an exact match! -
The prefix can be changed: The default (when no prefix is set) is the translated prefix from the messages.yml config in the user's language.
Note that every custom prefix is suffixed with:โ
, soprefix:Library_password
will require the user to enterLibrary password: myfancypassword
.
To disable the prefix use an emptyprefix:
declaration, e.g.password myfancypassword prefix: events:success
. Be aware of these side effects that come with disabling the prefix:- Nothing will be hidden on failure, so tries will be visible in chat and commands will get executed!
- If a command was used to enter the password, the command will not be canceled on success and thus still be executed!
- This ensures that even if your password is
quest
you can still execute the/quest
command.
-
You can also add the
ignoreCase
argument if you want a password's capitalization to be ignored. This is especially important for regex matching. -
If you want to trigger one or more events when the player failed to guess the password you can use the argument
fail
with a list of events (comma separated). With disabled prefix every command or chat message will trigger these events!
Example
password beton ignoreCase prefix:secret fail:failEvent1,failEvent2 events:message,reward
Pickup item: pickup
๐
To complete this objective you need to pickup the specified amount of items.
The first argument must be the internal name of an item defined in items.yml
. This can also be a comma-separated list of multiple items.
You can optionally add the amount:
argument to specify how many of these items the player needs to pickup.
This amount is a total amount though, it does not count per each individual item.
You can also add the notify
keyword to display how many items are left to pickup.
Example
pickup emerald amount:3 events:reward notify
pickup emerald,diamond amount:6 events:reward notify
This objective has two variable properties: amount
(shows how much the player already collected) and left
(displays how much is left to pickup).
Mob Kill: mobkill
๐
The player must kill specified amount of mobs You must specify mob type first and then amount. You can find possible mob
types here: mob types. Additionally you
can specify names for mobs with name:Uber_Zombie
, so only killing properly named mobs counts. All _
are replaced
with spaces, so in this example you would have to kill 5 zombies with "Uber Zombie" above their heads. You can also
specify notify
keyword to display messages to the player each time he kills a mob, optionally with the notification
interval after colon. If you want to accept only mobs marked with spawn
event, use marked:
argument followed by the
keyword used in that event.
This objective also has two properties, amount
and left
. Amount is the current amount of killed mobs, left is amount
needed to complete the objective.
Example
mobkill ZOMBIE 5 name:Uber_Zombie conditions:night
Potion brewing: brew
๐
To complete this objective the player needs to brew specified amount of specified potions.
The first argument is a potion ID from items.yml. Second argument is amount of potions.
You can optionally add notify
argument to make the objective display progress to players,
optionally with the notification interval after a colon.
The brewing will be accepted if the player was the last one add something to the brewing stand and will only count newly brewed potions.
This objective has these three properties: amount
for what is already done, left:
for what is still left and total
for what was initially required.
Example
brew weird_concoction 4 event:add_tag
Sheep shearing: shear
๐
To complete this objective the player has to shear specified amount of sheep, optionally with specified color and/or
name. The first, required argument is amount (integer). Optionally, you can add a name:
argument to only count specific sheep.
All underscores will be replaced by spaces - if you want to use underscores, put a \
before them.
You can also check for the sheep's color:
using these color names.
Sheep shearing has the same properties as mob kill objective.
Example
shear 1 name:Bob color:black
shear 1 name:jeb\_
"shear 1 name:jeb\\_" #Use two backslashes if quoted
Smelting: smelt
๐
To complete this objective the player must smelt a specified item. Note that you must define the output item, not the ingredient. The first argument is a Block Selector for the output item. The second is the amount (integer).
Smelting has the same properties as crafting objective.
Example
smelt IRON_INGOT 5 events:reward
Step on pressure plate: step
๐
To complete this objective the player has to step on a pressure plate at a given location. The type of plate does not matter. The first and only required argument is a location. If the pressure plate is not present at that location, the objective will not be completable and will log errors in the console.
Step objective contains one property, location
. It shows the exact location of the pressure plate in a string
formatted like X: 100, Y: 200, Z:300
.
Example
step 100;200;300;world events:done
Taming: tame
๐
To complete this objective player must tame some amount of mobs. First argument is type, second is amount.
The mob must be tameable for the objective to be valid, e.g. on 1.16.1: CAT
, DONKEY
, HORSE
, LLAMA
, PARROT
or WOLF
Taming has the same properties as mob kill objective.
Example
tame WOLF 2 events:wolfs_tamed
Jump!: jump
๐
To complete this objective player must jump. The only argument is amount.
amount
and left
are supported as objective variable properties.
Example
jump 15 events:legExerciseDone
Riding: riding
๐
This objective can be completed by riding the specified entity.
any
is also a valid input and matches any entity.
Example
riding horse
Variable: variable
๐
This objective is different. You cannot complete it, it will also ignore defined events and conditions. You can start it and that's it.
While this objective is active though, everything the player types in chat (and matches special pattern) will become a variable.
The pattern is key: value
. So if you type that, it will create a variable called key
, which will resolve to value
string.
These are not global variables, you can access them as objective properties. Let's say you defined this objective as var
in your objectives.yml file.
You can access the variable in any conversation, event or condition with %objective.var.key%
- and in case of this example, it will resolve to value
.
The player can type something else, and the variable will change its value. Variables are per-player, so my key
variable
will be different from your key
variable, depending on what we were typing in chat. You can have as much variables here as you want.
To remove this objective use objective delete
event - there is no other way.
You can also use variable
event to change variables stored in this objective. There is one optional argument, no-chat
. If you use it, the objective won't be modified by what players type in chat.
Example
variable