Warp Rules
Configure teleport costs and other effects and limitations on teleportation.
Warp Requirements are defined in the following format:
[condition1, condition2] modifier()
Example:
[is_not_interdimensional] scaled_add_xp_cost(distance, 0.01)
[is_interdimensional] add_xp_cost(27)
[source_is_warp_plate] multiply_xp_cost(0)
[target_is_global] multiply_xp_cost(0)
[target_is_fleeting_memorial] multiply_xp_cost(0)
min_xp_cost(0)
max_xp_cost(27)
[source_is_inventory_button] add_cooldown(inventory_button, 300)
These definitions are run in-order. Modifiers will only run if all conditions pass.
For example, to disallow interdimensional warps to and from the end, you could use the following requirement:
[is_interdimensional, involves_dimension(minecraft:the_end)] refuse(You cannot warp to or from The End.)
Modifiers
| Modifier | Description | Example |
|---|---|---|
add_level_cost(levels) | Adds the specified amount to the warp level cost | add_level_cost(1) |
multiply_level_cost(levels) | Multiplies the warp level cost by the specified amount | multiply_level_cost(2) |
scaled_add_level_cost(variable, scale) | Adds levels to the cost of the warp in the amount of the specified variable and scale factor | scaled_add_level_cost(distance, 0.01) |
min_level_cost(levels) | Clamps the level cost to the given minimum value. | min_level_cost(1) |
max_level_cost(levels) | Clamps the level cost to the given maximum value. | max_level_cost(3) |
add_xp_cost(levels) | Adds the specified amount to the warp XP cost | add_xp_cost(1) |
multiply_xp_cost(levels) | Multiplies the warp XP cost by the specified amount | multiply_xp_cost(2) |
scaled_add_xp_cost(variable, scale) | Adds XP to the cost of the warp in the amount of the specified variable and scale factor | scaled_add_xp_cost(distance, 0.01) |
min_xp_cost(levels) | Clamps the XP cost to the given minimum value. | min_xp_cost(1) |
max_xp_cost(levels) | Clamps the XP cost to the given maximum value. | max_xp_cost(3) |
add_cooldown(name, seconds) | Adds the specified amount to the warp cooldown | add_cooldown(my_cooldown, 60) |
multiply_cooldown(name, multiplier) | Multiplies the warp cooldown by the specified amount | multiply_cooldown(my_cooldown, 2) |
scaled_add_cooldown(name, variable, scale) | Adds seconds to the cooldown of the warp in the amount of the specified variable and scale factor | scaled_add_cooldown(my_cooldown, distance, 0.01) |
min_cooldown(name, seconds) | Clamps the cooldown to the given minimum value | min_cooldown(my_cooldown, 30) |
max_cooldown(name, seconds) | Clamps the cooldown to the given maximum value | max_cooldown(my_cooldown, 120) |
add_soft_cooldown(name, seconds) | Adds seconds to the cooldown of the warp in the amount of the specified variable and scale factor, without refusing warps | add_soft_cooldown(my_cooldown, 60) |
multiply_soft_cooldown(name, multiplier) | Multiplies the warp cooldown by the specified amount, without refusing warps | multiply_soft_cooldown(my_cooldown, 2) |
scaled_add_soft_cooldown(name, variable, scale) | Adds seconds to the cooldown of the warp in the amount of the specified variable and scale factor, without refusing warps | scaled_add_soft_cooldown(my_cooldown, distance, 0.01) |
min_soft_cooldown(name, seconds) | Clamps the cooldown to the given minimum value, without refusing warps | min_soft_cooldown(my_cooldown, 30) |
max_soft_cooldown(name, seconds) | Clamps the cooldown to the given maximum value, without refusing warps | max_soft_cooldown(my_cooldown, 120) |
add_item_cost(item, count) | Adds the specified amount to the warp item cost | add_item_cost(minecraft:diamond, 1) |
multiply_item_cost(item, multiplier) | Multiplies the warp item cost by the specified amount | multiply_item_cost(minecraft:diamond, 2) |
scaled_add_item_cost(variable, item, scale) | Adds items to the cost of the warp in the amount of the specified variable and scale factor | scaled_add_item_cost(distance, minecraft:diamond, 0.01) |
min_item_cost(item, min) | Clamps the item cost to the given minimum value | min_item_cost(minecraft:diamond, 1) |
max_item_cost(item, max) | Clamps the item cost to the given maximum value | max_item_cost(minecraft:diamond, 3) |
refuse(message) | Refuses the warp with the specified message. Prepend message with $ to use a translation key | refuse(You are not allowed to warp here.) or refuse($your.custom.translation.key) |
dismount() | Dismounts the player from any mounted entity before teleporting | dismount() |
Conditions
| Condition | Description | Example |
|---|---|---|
[is_interdimensional] | Passes if the warp is between two dimensions | [is_interdimensional] |
[is_not_interdimensional] | Passes if the warp is within the same dimension | [is_not_interdimensional] |
[source_is_warp_plate] | Passes if the warp originates from a warp plate | [source_is_warp_plate] |
[source_is_not_warp_plate] | Passes if the warp does not originate from a warp plate | [source_is_not_warp_plate] |
[source_is_waystone] | Passes if the warp originates from a waystone | [source_is_waystone] |
[source_is_not_waystone] | Passes if the warp does not originate from a waystone | [source_is_not_waystone] |
[source_is_portstone] | Passes if the warp originates from a portstone | [source_is_portstone] |
[source_is_not_portstone] | Passes if the warp does not originate from a portstone | [source_is_not_portstone] |
[source_is_sharestone] | Passes if the warp originates from a sharestone | [source_is_sharestone] |
[source_is_not_sharestone] | Passes if the warp does not originate from a sharestone | [source_is_not_sharestone] |
[source_is_orange_sharestone] | Passes if the warp originates from an orange sharestone | [source_is_orange_sharestone] |
[source_is_not_orange_sharestone] | Passes if the warp does not originate from an orange sharestone | [source_is_not_orange_sharestone] |
[source_is_magenta_sharestone] | Passes if the warp originates from a magenta sharestone | [source_is_magenta_sharestone] |
[source_is_not_magenta_sharestone] | Passes if the warp does not originate from a magenta sharestone | [source_is_not_magenta_sharestone] |
[source_is_light_blue_sharestone] | Passes if the warp originates from a light blue sharestone | [source_is_light_blue_sharestone] |
[source_is_not_light_blue_sharestone] | Passes if the warp does not originate from a light blue sharestone | [source_is_not_light_blue_sharestone] |
[source_is_yellow_sharestone] | Passes if the warp originates from a yellow sharestone | [source_is_yellow_sharestone] |
[source_is_not_yellow_sharestone] | Passes if the warp does not originate from a yellow sharestone | [source_is_not_yellow_sharestone] |
[source_is_lime_sharestone] | Passes if the warp originates from a lime sharestone | [source_is_lime_sharestone] |
[source_is_not_lime_sharestone] | Passes if the warp does not originate from a lime sharestone | [source_is_not_lime_sharestone] |
[source_is_pink_sharestone] | Passes if the warp originates from a pink sharestone | [source_is_pink_sharestone] |
[source_is_not_pink_sharestone] | Passes if the warp does not originate from a pink sharestone | [source_is_not_pink_sharestone] |
[source_is_gray_sharestone] | Passes if the warp originates from a gray sharestone | [source_is_gray_sharestone] |
[source_is_not_gray_sharestone] | Passes if the warp does not originate from a gray sharestone | [source_is_not_gray_sharestone] |
[source_is_light_gray_sharestone] | Passes if the warp originates from a light gray sharestone | [source_is_light_gray_sharestone] |
[source_is_not_light_gray_sharestone] | Passes if the warp does not originate from a light gray sharestone | [source_is_not_light_gray_sharestone] |
[source_is_cyan_sharestone] | Passes if the warp originates from a cyan sharestone | [source_is_cyan_sharestone] |
[source_is_not_cyan_sharestone] | Passes if the warp does not originate from a cyan sharestone | [source_is_not_cyan_sharestone] |
[source_is_purple_sharestone] | Passes if the warp originates from a purple sharestone | [source_is_purple_sharestone] |
[source_is_not_purple_sharestone] | Passes if the warp does not originate from a purple sharestone | [source_is_not_purple_sharestone] |
[source_is_blue_sharestone] | Passes if the warp originates from a blue sharestone | [source_is_blue_sharestone] |
[source_is_not_blue_sharestone] | Passes if the warp does not originate from a blue sharestone | [source_is_not_blue_sharestone] |
[source_is_brown_sharestone] | Passes if the warp originates from a brown sharestone | [source_is_brown_sharestone] |
[source_is_not_brown_sharestone] | Passes if the warp does not originate from a brown sharestone | [source_is_not_brown_sharestone] |
[source_is_green_sharestone] | Passes if the warp originates from a green sharestone | [source_is_green_sharestone] |
[source_is_not_green_sharestone] | Passes if the warp does not originate from a green sharestone | [source_is_not_green_sharestone] |
[source_is_red_sharestone] | Passes if the warp originates from a red sharestone | [source_is_red_sharestone] |
[source_is_not_red_sharestone] | Passes if the warp does not originate from a red sharestone | [source_is_not_red_sharestone] |
[source_is_black_sharestone] | Passes if the warp originates from a black sharestone | [source_is_black_sharestone] |
[source_is_not_black_sharestone] | Passes if the warp does not originate from a black sharestone | [source_is_not_black_sharestone] |
[source_is_inventory_button] | Passes if the warp originates from the inventory button | [source_is_inventory_button] |
[source_is_not_inventory_button] | Passes if the warp does not originate from the inventory button | [source_is_not_inventory_button] |
[source_is_warp_stone] | Passes if the warp originates from a warp stone | [source_is_warp_stone] |
[source_is_not_warp_stone] | Passes if the warp does not originate from a warp stone | [source_is_not_warp_stone] |
[source_is_scroll] | Passes if the warp originates from a scroll | [source_is_scroll] |
[source_is_not_scroll] | Passes if the warp does not originate from a scroll | [source_is_not_scroll] |
[source_is_warp_scroll] | Passes if the warp originates from a warp scroll | [source_is_warp_scroll] |
[source_is_not_warp_scroll] | Passes if the warp does not originate from a warp scroll | [source_is_not_warp_scroll] |
[source_is_bound_scroll] | Passes if the warp originates from a bound scroll | [source_is_bound_scroll] |
[source_is_not_bound_scroll] | Passes if the warp does not originate from a bound scroll | [source_is_not_bound_scroll] |
[source_is_return_scroll] | Passes if the warp originates from a return scroll | [source_is_return_scroll] |
[source_is_not_return_scroll] | Passes if the warp does not originate from a return scroll | [source_is_not_return_scroll] |
[source_name_equals] | Passes if the name of the source waystone equals the given parameter | [source_name_equals(Server Spawn)] |
[source_name_contains] | Passes if the name of the source waystone equals the given parameter | [source_name_contains(Home)] |
[target_is_warp_plate] | Passes if the warp destination is a warp plate | [target_is_warp_plate] |
[target_is_not_warp_plate] | Passes if the warp destination is not a warp plate | [target_is_not_warp_plate] |
[target_is_waystone] | Passes if the warp destination is a waystone | [target_is_waystone] |
[target_is_not_waystone] | Passes if the warp destination is not a waystone | [target_is_not_waystone] |
[target_is_sharestone] | Passes if the warp destination is a sharestone | [target_is_sharestone] |
[target_is_not_sharestone] | Passes if the warp destination is not a sharestone | [target_is_not_sharestone] |
[target_is_orange_sharestone] | Passes if the warp originates from an orange sharestone | [target_is_orange_sharestone] |
[target_is_not_orange_sharestone] | Passes if the warp does not originate from an orange sharestone | [target_is_not_orange_sharestone] |
[target_is_magenta_sharestone] | Passes if the warp originates from a magenta sharestone | [target_is_magenta_sharestone] |
[target_is_not_magenta_sharestone] | Passes if the warp does not originate from a magenta sharestone | [target_is_not_magenta_sharestone] |
[target_is_light_blue_sharestone] | Passes if the warp originates from a light blue sharestone | [target_is_light_blue_sharestone] |
[target_is_not_light_blue_sharestone] | Passes if the warp does not originate from a light blue sharestone | [target_is_not_light_blue_sharestone] |
[target_is_yellow_sharestone] | Passes if the warp originates from a yellow sharestone | [target_is_yellow_sharestone] |
[target_is_not_yellow_sharestone] | Passes if the warp does not originate from a yellow sharestone | [target_is_not_yellow_sharestone] |
[target_is_lime_sharestone] | Passes if the warp originates from a lime sharestone | [target_is_lime_sharestone] |
[target_is_not_lime_sharestone] | Passes if the warp does not originate from a lime sharestone | [target_is_not_lime_sharestone] |
[target_is_pink_sharestone] | Passes if the warp originates from a pink sharestone | [target_is_pink_sharestone] |
[target_is_not_pink_sharestone] | Passes if the warp does not originate from a pink sharestone | [target_is_not_pink_sharestone] |
[target_is_gray_sharestone] | Passes if the warp originates from a gray sharestone | [target_is_gray_sharestone] |
[target_is_not_gray_sharestone] | Passes if the warp does not originate from a gray sharestone | [target_is_not_gray_sharestone] |
[target_is_light_gray_sharestone] | Passes if the warp originates from a light gray sharestone | [target_is_light_gray_sharestone] |
[target_is_not_light_gray_sharestone] | Passes if the warp does not originate from a light gray sharestone | [target_is_not_light_gray_sharestone] |
[target_is_cyan_sharestone] | Passes if the warp originates from a cyan sharestone | [target_is_cyan_sharestone] |
[target_is_not_cyan_sharestone] | Passes if the warp does not originate from a cyan sharestone | [target_is_not_cyan_sharestone] |
[target_is_purple_sharestone] | Passes if the warp originates from a purple sharestone | [target_is_purple_sharestone] |
[target_is_not_purple_sharestone] | Passes if the warp does not originate from a purple sharestone | [target_is_not_purple_sharestone] |
[target_is_blue_sharestone] | Passes if the warp originates from a blue sharestone | [target_is_blue_sharestone] |
[target_is_not_blue_sharestone] | Passes if the warp does not originate from a blue sharestone | [target_is_not_blue_sharestone] |
[target_is_brown_sharestone] | Passes if the warp originates from a brown sharestone | [target_is_brown_sharestone] |
[target_is_not_brown_sharestone] | Passes if the warp does not originate from a brown sharestone | [target_is_not_brown_sharestone] |
[target_is_green_sharestone] | Passes if the warp originates from a green sharestone | [target_is_green_sharestone] |
[target_is_not_green_sharestone] | Passes if the warp does not originate from a green sharestone | [target_is_not_green_sharestone] |
[target_is_red_sharestone] | Passes if the warp originates from a red sharestone | [target_is_red_sharestone] |
[target_is_not_red_sharestone] | Passes if the warp does not originate from a red sharestone | [target_is_not_red_sharestone] |
[target_is_black_sharestone] | Passes if the warp originates from a black sharestone | [target_is_black_sharestone] |
[target_is_not_black_sharestone] | Passes if the warp does not originate from a black sharestone | [target_is_not_black_sharestone] |
[target_is_global] | Passes if the warp destination is a global waystone | [target_is_global] |
[target_is_not_global] | Passes if the warp destination is not a global waystone | [target_is_not_global] |
[target_name_equals] | Passes if the name of the source waystone equals the given parameter | [target_name_equals(Server Spawn)] |
[target_name_contains] | Passes if the name of the source waystone equals the given parameter | [target_name_contains(Home)] |
[is_with_passengers] | Passes if the warp is performed with vehicle passengers | [is_with_passengers] |
[is_not_with_passengers] | Passes if the warp is not performed with vehicle passengers | [is_not_with_passengers] |
[is_with_pets] | Passes if the warp is performed with pets | [is_with_pets] |
[is_not_with_pets] | Passes if the warp is not performed with pets | [is_not_with_pets] |
[is_with_leashed] | Passes if the warp is performed with leashed entities | [is_with_leashed] |
[is_not_with_leashed] | Passes if the warp is not performed with leashed entities | [is_not_with_leashed] |
[source_is_dimension(namespace:path)] | Passes if the warp originates from the specified dimension | [source_is_dimension(minecraft:overworld)] |
[source_is_not_dimension(namespace:path)] | Passes if the warp does not originate from the specified dimension | [source_is_not_dimension(minecraft:the_nether)] |
[target_is_dimension(namespace:path)] | Passes if the warp destination is the specified dimension | [target_is_dimension(minecraft:the_end)] |
[target_is_not_dimension(namespace:path)] | Passes if the warp destination is not the specified dimension | [target_is_not_dimension(minecraft:overworld)] |
[involves_dimension(namespace:path)] | Passes if the warp involves the specified dimension | [involves_dimension(minecraft:the_nether)] |
[not_involves_dimension(namespace:path)] | Passes if the warp does not involve the specified dimension | [not_involves_dimension(minecraft:overworld)] |
[is_within_distance(distance)] | Passes if the warp is within the specified distance | [is_within_distance(100)] |
[is_not_within_distance(distance)] | Passes if the warp is not within the specified distance | [is_not_within_distance(100)] |
[has_cooldown(name)] | Passes if the player is on a cooldown | [has_cooldown(inventory_button)] |
[not_has_cooldown(name)] | Passes if the player is not on a cooldown | [not_has_cooldown(inventory_button)] |
[has_cooldown_above(name, seconds)] | Passes if the player is on a cooldown for more than the specified amount of seconds | [has_cooldown_above(inventory_button, 60)] |
[not_has_cooldown_above(name, seconds)] | Passes if the player is not on a cooldown for more than the specified amount of seconds | [not_has_cooldown_above(inventory_button, 60)] |
[is_on_any_vehicle] | Passes if the player is riding any vehicle | [is_on_any_vehicle] |
[is_not_on_any_vehicle] | Passes if the player is not riding any vehicle | [is_not_on_any_vehicle] |
[is_on_vehicle(namespace:path)] | Passes if the player is riding the specified entity type | [is_on_vehicle(minecraft:boat)] |
[is_not_on_vehicle(namespace:path)] | Passes if the player is not riding the specified entity type | [is_not_on_vehicle(minecraft:boat)] |
[has_empty_inventory] | Passes if the player has an empty inventory | [has_empty_inventory] |
[not_has_empty_inventory] | Passes if the player does not have an empty inventory | [not_has_empty_inventory] |
[is_wearing_any_armor] | Passes if the player is wearing any armor | [is_wearing_any_armor] |
[is_not_wearing_any_armor] | Passes if the player is not wearing any armor | [is_not_wearing_any_armor] |
has_item(namespace:path, count) | Passes if the player has the specified item in their inventory | [has_item(minecraft:diamond, 1)] |
not_has_item(namespace:path, count) | Passes if the player does not have the specified item in their inventory | [not_has_item(minecraft:diamond, 1)] |
Variables
| Variable | Description |
|---|---|
| distance | The distance to the warp destination |
| leashed | The amount of leashed entities included in the warp |
| pets | The amount of pets included in the warp |
| passengers | The amount of vehicle passengers included in the warp |
{cooldown} | Remaining seconds of cooldown for this player, where {cooldown} is the name of a cooldown |