Automatically run a command when `rtp` is triggured!
You can now automatically have commands run when someone rtps. When you configure an rtpSettings section, you can write commands under `then-execute` like so:
Code (YAML):
then-execute: - 'tellraw
%PLAYER% {"text":"You have been teleported to %LOCATION% in %WORLD%!"}'
This could be useful if you want to give players a title on screen, sound effects, or potion effects when they teleport.
Code (Text):
%player% The players minecraft name
%player_display_name% The players 'display-name' or nickname
%location% The location the player landed, formatted like this: world (867, 53, -9)
%world% The world the player landed in, formatted like this: world
%x% or %y% or %z% Each of these will give its corresponding value, formatted like this: 86
%location_old% The location of the player before they moved.
%world_old% The world the player was in before they are moved.
%x_old% or %y_old% or %z_old% The x or y or z location of the player before they were moved.