Skip to content

Events ListπŸ”—

Cancel quest: cancelπŸ”—

This event works in the same way as a quest canceler in the backpack. Running it is equal to the player clicking on the bone. The only argument is a name of a quest canceler, as defined in the cancel section

Example

cancel wood

Chat player message chatπŸ”—

This event will send the given message as the player. Therefore, it will look like as if the player did send the message. The instruction string is the command, without leading slash. You can only use %player% as a variable in this event. Additional messages can be defined by separating them with | character. If you want to use a | character in the message use \|.

If a plugin does not work with the sudo / command event you need to use this event.

Example

sendMSG: "chat Hello!"
sendMultipleMSGs: "chat Hi %player%|ban %player%|pardon %player%"
sendPluginCommand: "chat /someCommand x y z"

Chest Clear: chestclearπŸ”—

persistent, static

This event removes all items from a chest at specified location. The only argument is a location.

Example

chestclear 100;200;300;world

Chest Give: chestgiveπŸ”—

persistent, static

This works the same as give event, but it puts the items in a chest at specified location. The first argument is a location, the second argument is a list of items, like in give event. If the chest is full, the items will be dropped on the ground. The chest can be any other block with inventory, i.e. a hopper or a dispenser. BetonQuest will log an error to the console when this event is fired but there is no chest at specified location.

Example

chestgive 100;200;300;world emerald:5,sword

Chest Take: chesttakeπŸ”—

persistent, static

This event works the same as take event, but it takes items from a chest at specified location. The instruction string is defined in the same way as in chestgive event.

Example

chesttake 100;200;300;world emerald:5,sword

Clear entities: clearπŸ”—

This event removes all specified mobs from the specified area. The first required argument is a list of mobs (taken from here) separated by commas. Next is location. After that there is the radius around the location (a positive number or a variable). You can also optionally specify name: argument, followed by name which removed mobs must have. You can use marked: argument to remove only mobs marked in spawn event.

Example

clear ZOMBIE,CREEPER 100;200;300;world 10 name:Monster

Compass: compassπŸ”—

When you run this event, you can add or remove a compass destination for the player. You may also directly set the player's compass destination as well. When a destination is added the player will be able to select a specified location as a target of his compass. To select the target the player must open his backpack and click on the compass icon. The first argument is add,del or set, and second one is the name of the target, as defined in the compass section. Note that if you set a target the player will not automatically have it added to their choices.

The destination must be defined in compass section. You can specify a name for the target in each language or just give a general name, and optionally add a custom item (from items section) to be displayed in the backpack. Example of a compass target:

compass:
  beton:
    name:
      en: Target
      pl: Cel
    location: 100;200;300;world
    item: scroll

Example

compass add beton

Command: commandπŸ”—

persistent, static

Runs specified command from the console. The instruction string is the command, without leading slash. You can use variables here, but variables other than %player% won't resolve if the event is fired from delayed folder and the player is offline now. You can define additional commands by separating them with | character. If you want to use a | character in the command use \|.

Looking for run command as player?

Example

command kill %player%|ban %player%

Conversation: conversationπŸ”—

Starts a conversation at location of the player. The only argument is ID of the conversation. This bypasses the conversation permission!

Example

conversation village_smith

Damage player: damageπŸ”—

Damages the player by specified amount of damage. The only argument is a number (can have floating point).

Example

damage 20

Delete Point: deletepointπŸ”—

persistent, static

Delete the player points in a specified category.

Example

deletepoint npc_attitude

Door: doorπŸ”—

persistent, static

This event can open and close doors, trapdoors and fence gates. The syntax is exactly the same as in lever event above.

Example

door 100;200;300;world off

Remove Potion Effect: deleffectπŸ”—

Removes the specified potion effects from the player. Use any instead of a list of types to remove all potion effects from the player.

Example

deleffect ABSORPTION,BLINDNESS

Potion Effect: effectπŸ”—

Adds a specified potion effect to player. First argument is potion type. You can find all available types here. Second is integer defining how long the effect will last in seconds. Third argument, also integer, defines level of the effect (1 means first level). Add a parameter ambient to make potion particles appear more invisible (just like beacon effects). To hide particles add a parameter hidden. To hide the icon for the effect add noicon.

Example

effect BLINDNESS 30 1 ambient icon

Explosion: explosionπŸ”—

static

Creates an explosion. It can make fire and destroy blocks. You can also define power, so be careful not to blow your server away. Default TNT power is 4, while Wither on creation is 7. First argument can be 0 or 1 and states if explosion will generate fire (like Ghast's fireball). Second is also 0 or 1 but this defines if block will be destroyed or not. Third argument is the power (float number). At the end (4th attribute) there is location.

Example

explosion 0 1 4 100;64;-100;survival

Run multiple events: folderπŸ”—

persistent, static

This event wraps multiple events inside itself. Once triggered, it simply executes it's events. This is usefully to easily refer to a bunch of events at once, e.g. in a conversation.

Events marked as persistent will be fired even after the player logs out. Beware though, all conditions are false when the player is offline (even inverted ones), so those events should not be blocked by any conditions!

Parameter Syntax Default Value Explanation
events to run eventName1,event2 One or multiple events to run. Contains event names seperated by commas.
delay Keyword 1 tick The delay before the folder starts executing it's events.
period period:number 1 tick The time between each event. Minimum value is one tick (~20ms).
time unit Keyword Seconds The unit of time to use for delay and period. Either ticks or minutes. Omit to use seconds.
random random:number Disabled Enables "random mode". Will randomly pick the defined amount of events .
Examples
events:
  simpleFolder: "folder event1,event2,event3" # (1)!
  runEvents: "folder event1,event2,event3 delay:5 period:1" # (2)!
  troll: "folder killPlayer,banPlayer,kickPlayer delay:5 random:1" # (3)!
  wait: "folder messagePlayer,giveReward delay:1 minutes" # (4)!
  1. Runs all events after one tick with a delay of one tick between each event.
  2. Runs event1 after an initial delay of 5 seconds, then waits one second before executing each leftover event.
  3. Randomly executes one of the three events after 5 seconds.
  4. Executes the events after one minute.

Give Items: giveπŸ”—

Gives the player predefined items. They are specified exactly as in item condition - list separated by commas, every item can have amount separated by colon. Default amount is 1. If the player doesn't have required space in the inventory, the items are dropped on the ground, unless they are quest items. Then they will be put into the backpack. You can also specify notify keyword to display a simple message to the player about receiving items.

Example

give emerald:5,emerald_block:9

Give journal: givejournalπŸ”—

This event simply gives the player his journal. It acts the same way as /j command would.

Example

givejournal

Global point: globalpointπŸ”—

persistent, static

This works the same way as the normal point event but instead to manipulating the points for a category of a specific player it manipulates points in a global category. These global categories are player independent, so you could for example add a point to such a global category every time a player does a quest and give some special rewards for the 100th player who does the quest.

Example

globalpoint global_knownusers 1

Global tag: globaltagπŸ”—

persistent, static

Works the same way as a normal tag event, but instead of setting a tag for one player it sets it globally for all players.

Example

globaltag add global_areNPCsAgressive

Hunger: hungerπŸ”—

This event changes the food level of the player. The second argument is the modification type. There are give, take and set. The second argument is the amount. With set can the food level be anything. If give or take is specified and the final amount won't be more than 20 or less than 0. If the hunger level is below 7, the player cannot sprint.

Example

hunger set 20
hunger give 5

If else: ifπŸ”—

This event will check a condition, and based on the outcome it will run the first or second event. The instruction string is if condition event1 else event2, where condition is a condition ID and event1 and event2 are event IDs. else keyword is mandatory between events for no practical reason.

Example

if sun rain else sun

Journal: journalπŸ”—

static

Adds or deletes an entry to/from a player's journal. Journal entries have to be defined in the journal section. The first argument is the action to perform, the second one is the name of the entry if required. Changing journal entries will also reload the journal.

Possible actions are: - add: Adds a page to the journal. - delete: Deletes a page from the journal. - update: Refreshes the journal. This is especially useful when you need to update the main page.

Example

journal add quest_started
journal delete quest_available
journal update

Kill: killπŸ”—

Kills the player. Nothing else.

Kill Mobs: killmobπŸ”—

persistent, static

Kills all mobs of given type at the location. First argument is the type of the mob. Next argument is the location. Third argument is the radius around the location, in which the mobs must be to get killed.
You can also specify name: argument, followed by the name of the mob which should get killed. All _ characters will be replaced with spaces. If you want to kill only mobs that have been marked using the spawn mob event use marked: argument followed by the keyword.

Only mobs that are in loaded chunks can be killed by using this event.

Example

killmob ZOMBIE 100;200;300;world 40 name:Bolec

Language Event: languageπŸ”—

This event changes player's language to the specified one. There is only one argument, the language name.

Example

language en

Lever: leverπŸ”—

persistent, static

This event can switch a lever. The first argument is a location and the second one is state: on, off or toggle.

Example

lever 100;200;300;world toggle

Lightning: lightningπŸ”—

static

Strikes a lightning at given location. The only argument is the location.

Example

lightning 100;64;-100;survival

Notification: notifyπŸ”—

Displays a notification using the NotifyIO system.

Warning

All colons (:) in the message part of the notification need to be escaped, including those inside variables. One backslash (\) is required when using no quoting at all (...) or single quotes ('...'). Two backslashes are required (\\) when using double quotes ("...").

Examples:
eventName: notify Peter:Heya %player%! ➑ eventName: notify Peter\:Heya %player%!
eventName: 'notify Peter:Heya %player%!' ➑ eventName: 'notify Peter\:Heya %player%!'
eventName: "notify Peter:Heya %player%!" ➑ eventName: "notify Peter\\:Heya %player%!"
otherEvent: notify You own %math.calc:5% fish! ➑ otherEvent: You own %math.calc\:5% fish!

Option Description
message The message that will be displayed. Supports variables and translations. Required, must be first
category Will load all settings from that Notification Category. Can be a comma-seperated list. The first existent category will be used. Optional
io Any NotifyIO. Overrides the "category" settings. Optional
NotifyIO Any setting from the defined notifyIO. Can be used multiple times. Overrides the "category" settings. Optional

The fallback NotifyIO is chat if no argument other than message is specified.
message is the only argument of this event that is not key:value based. You can freely add any text with spaces there.

It also allows you to provide multiple translations using a special syntax:

example: "notify {en} ABC {de} DEF"
The value in {} is a language key from messages.yml. Any text after the language key until the next language key belongs to the specified language. There must be a space between the language key and the message. In this example, english users would see ABC and german ones would see DEF.

Examples:

Check out the documentation about Notify Categories and Notify IO options if you haven't yet. You must understand these two if you want to use the Notify system to it's full extend.

#The simplest of all notify events. Just a chat message:
customEvent: "notify Hello %player%!"  

#It's the same as this one since 'chat' is the default IO.
theSame: "notify Hello %player%! io:chat"

#This one displays a title and a subtile:
myTitle: "notify This is a title.\nThis is a subtitle. io:title"

#Plays a sound:
mySound: "notify io:sound sound:x.y.z"

#This one explicitly defines an io (bossbar) and adds one bossbarIO option + one soundIO option:
myBar: "notify This is a custom message. io:bossbar barColor:red sound:block.anvil.use"

#Some events with categories.
myEvent1: "notify This is a custom message! category:info"
myEvent2: "notify This is a custom message! category:firstChoice,secondChoice"

#You can also override category settings:
myEvent3: "notify Another message! category:info io:advancement frame:challenge"

#Use multiple languages:
multilanguage: "notify {en} Hello english person! {de} Hello german person! {es} Hello spanish person!"

Broadcast: notifyallπŸ”—

This events works just like the notify event but shows the notification for all online players.

Objective: objectiveπŸ”—

persistent, static

Manages the objectives. Syntax is objective <action> name, where <action> can be start/add (one of the two), delete/remove or complete/finish. Name is the name of the objective, as defined in the objectives section.

Using this in static contexts only works when removing objectives!

Example

objective start wood

OPsudo: opsudoπŸ”—

This event is similar to the sudo event, the only difference is that it will fire a command as the player with temporary OP permissions. Additional commands can be defined by separating them with | character. If you want to use a | character in the message use \|.

Looking for run as normal player? Looking for console commands?

Example

opsudo spawn

Party event: partyπŸ”—

Runs the specified list of events (third argument) for every player in a party. More info about parties in "Party" chapter in Reference section.

Example

party 10 has_tag1,!has_tag2 give_reward

Pick random: pickrandomπŸ”—

persistent, static

Another container for events. It picks one (or multiple) of the given events and runs it. You must specify how likely it is that each event is picked by adding the percentage before the event's id. The event won't break if your total percentages are above 100%.

It picks one event from the list by default, but you can add an optional amount: if you want more to be picked. Note that only as many events as specified can be picked and amount:0 will do nothing.

There must be two %% before the event's name if variables are used, one is from the variable and the other one from the event's syntax.

Example

pickrandom 20.5%event1,0.5%event2,79%event3 amount:2
pickrandom %point.factionXP.amount%%event1,0.5%event2,79%event3,1%event4 amount:3

Point: pointπŸ”—

persistent

Gives the player a specified amount of points in a specified category. Amount can be negative if you want to subtract points. You can also use an asterisk to do multiplication (or division, if you use a fraction). First argument after the event name must be a category, and the second one - amount of points to give/take/multiply. This event also supports an optional notify argument that will display information about the change using the notification system.

Example

point npc_attitude 10

Example

point village_reputation *0.75

Run events: runπŸ”—

persistent, static

This event allows you to specify multiple instructions in one, long instruction. Each instruction must be started with the ^ character (it divides all the instructions). It's not the same as the folder event, because you have to specify the actual instruction, not an event name. Don't use conditions here, it behaves strangely. We will fix this in 2.0.

Example

run ^tag add beton ^give emerald:5 ^entry add beton ^kill

Scoreboard: scoreπŸ”—

This event works in the same way as point event, the only difference is that is uses scoreboards instead of points. You can add, subtract, multiply and divide scores in objectives on the scoreboard. The first argument is the name of the objective, second one is a number. It can be positive for addition, negative for subtraction or prefixed with an asterisk for multiplication. Multiplying by fractions is the same as dividing.

Example

score kills 1

Set Block: setblockπŸ”—

persistent, static

Changes the block at the given position. The first argument is a Block Selector, the second a location. Very powerful if used to trigger redstone contraptions.

Example

setblock REDSTONE_BLOCK 100;200;300;world

Spawn Mob: spawnπŸ”—

persistent, static

Spawns specified amount of mobs of given type at the location. First argument is a location. Next is type of the mob. The last, third argument is integer for amount of mobs to be spawned. You can also specify name: argument, followed by the name of the mob. All _ characters will be replaced with spaces. You can also mark the spawned mob with a keyword using marked: argument. It won't show anywhere, and you can check for only marked mobs in mobkill objective.

You can specify armor which the mob will wear and items it will hold with h: (helmet), c: (chestplate), l: (leggings), b: (boots), m: (main hand) and o: (off hand) optional arguments. These take a single item without amount, as defined in the items section. You can also add a list of drops with drops: argument, followed by a list of items with amounts after colons, separated by commas.

Example

spawn 100;200;300;world SKELETON 5 marked:targets

Example

spawn 100;200;300;world ZOMBIE name:Bolec 1 h:blue_hat c:red_vest drops:emerald:10,bread:2

Sudo: sudoπŸ”—

This event is similar to command event, the only difference is that it will fire a command as the player (often referred to as player commands). Additional commands can be defined by separating them with | character. If you want to use a | character in the message use \|.

Looking for run as op? Looking for console commands?

Example

sudo spawn

Tag: tagπŸ”—

persistent, static

This event adds (or removes) a tag to the player. The first argument after event's name must be add or del. Next goes the tag name. It can't contain spaces (though _ is fine). Additional tags can be added, separated by commas (without spaces).

Example

tag add quest_started,new_entry

Take Items: takeπŸ”—

Removes items from the player’s inventory, armor slots or backpack. The items itself must be defined in the items section, optionally with an amount after a colon. Which inventory types are checked is defined by the invOrder: option. You can use Backpack, Inventory, Offhand and Armor there. One after another will be checked if multiple types are defined.

Note: If the items aren't quest items don't use takeevent with player options in conversations! The player can drop items before selecting the option and pickup them after the event fires. Validate it on the NPC’s reaction!

You can also specify notify keyword to display a simple message to the player about loosing items.

Example

take emerald:120,sword
take nugget:6 notify
take wand notify invOrder:Backpack
take money:50 invOrder:Backpack,Inventory
take armor invOrder:Armor,Offhand,Inventory,Backpack

Time: timeπŸ”—

Sets or adds time. The only argument is time to be set (integer) or time to be added (integer prefixed with +), in 24 hours format. Subtracting time is done by adding more time (if you think of this, it actually makes sense). Minutes can be achieved with floating point. Six minutes equals 0.1 hours.

Example

time +6
time +0.1

Teleport: teleportπŸ”—

Teleports the player to the specified location. Ends any active conversations.

Parameter Syntax Default Value Explanation
location Unified Location Formatting The location to which the player will be teleported.
Example
events:
  toCity: "teleport 432;121;532;world" # (1)!
  toHell: "teleport 123;32;-789;world_the_nether;180;45" # (2)!
  1. Teleports the player to X: 432, Y: 121, Z: 532 in the world named 'world'.
  2. Teleports the player to X: 123, Y: 32, Z: -789 in the world named 'world_the_nether'. Also sets the head rotation to yaw 180 and pitch 45.

Variable: variableπŸ”—

This event has only one purpose: Change values that are stored in variable objective variables. The first argument is the ID of the variable objective. The second argument is the name of the variable to set. The third argument is the value to set. Both the name and value can use %...% variables. To delete a variable you can use "". Refer to the variable objective documentation for more information about storing variables. This event will do nothing if the player does not already have a variable objective assigned to them.

Example

variable CustomVariable MyFirstVariable Goodbye!
variable variable_objectiveID name %player%
variable other_var_obj desc ""

Weather: weatherπŸ”—

persistent, static

Parameter Syntax Default Value Explanation
type Keyword The type of weather to set. Either sun, rain or storm.
duration duration:number Minecraft decides randomly. The duration the weather will last (in seconds). Can be a variable.
Is handled from minecraft afterwards.
world world:worldName The player's current world. The world to change the weather in.
Example
events:
  setSun: "weather sun"
  setShortRain: "weather rain duration:60 world:rpgworld"
  setStorm: "weather storm duration:%point.tribute.left:150%"

Give experience: experienceπŸ”—

Gives the specified amount of experience points to the player. You can give whole levels by adding the level argument.

Example

experience 4 level

Burn: burnπŸ”—

Parameter Syntax Default Value Explanation
duration duration:number The duration the player will burn (in seconds). Can be a variable.
Example
events:
  burn: "burn duration:4"
  punishing_fire: "burn duration:%point.punishment.amount%"

Move the player: velocityπŸ”—

Parameter Syntax Default Value Explanation
vector vector:(x;y;z) The values of the vector, which are decimal numbers, can be interpreted as absolute numbers like the coordinate or as relative directions. For more understanding the relative direction is similar to ^ ^ ^ in minecraft or in other words (sideways;upwards;forwards). Can be a variable.
direction direction:directionType absolute There are 3 types how the vector can get applied to the player:
absolute won't change the vector at all.
relative will redirect the vector to the view of the player.
relative_y is a mix between absolute and relative. It will still direct to the view but only horizontally, so y will be absolute.
modification modification:modificationType set Possible modifications are set and add. The modification type determines how the vector should be merged with the player's velocity. The player's velocity is the external force applied on the player.
Visual Explanation

In contrast to their global counterparts, relative x,y,z axes do not change their orientation relative to the player. Example: The positive x-axis will always point left from the perspective of the player.

relativeAxis image

Example
events:
  jumppad: "velocity vector:(2;0.8;4)"
  dash: "velocity vector:(0;0.1;1.3) direction:relative_y"
  variable_dash: "velocity vector:%objective.customVariable.dashLength% direction:relative_y"
  fly: "velocity vector:(0;0.1;2) direction:relative modification:add"