#(zen9967) Teleporting player in Last location
44 messages · Page 1 of 1 (latest)
(zen9967) Teleporting player in Last location
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Im thinking this is on player steps on water
But im not sure how i can make it teleport to last location where they jumped of. Or last block and not air.
I tried doing - teleport <player.context.last_location> but it included the air.
Did you mean to search for npctag.previous_location?
!t previous_location
!t below
Returns the location below this location. Optionally specify a number of blocks to go down.
This just moves straight along the Y axis, equivalent to !tag VectorObject.sub with input 0,1,0 (or the input value instead of '1').
math
LocationTag
!t flag
Multiple possible tags: <server.flag[<flag_name>]>, <FlaggableObject.flag[<flag_name>]>, <server.has_flag[<flag_name>]>, <server.flag_map[<name>|...]>, <FlaggableObject.has_flag[<flag_name>]>, <FlaggableObject.flag_map[<name>|...]>, <ItemTag.with_flag[<flag_set_action>]>, <server.list_flags>, <FlaggableObject.list_flags>, <server.npcs_flagged[<flag_name>]>, <AreaObject.blocks_flagged[<flag_name>]>, <ChunkTag.blocks_flagged[<flag_name>]>, <server.flag_expiration[<flag_name>]>, <server.players_flagged[<flag_name>]>, <FlaggableObject.flag_expiration[<flag_name>]>, <ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]>, <PlayerTag.worldguard.test_flag[<name>]>, <server.spawned_npcs_flagged[<flag_name>]>, <server.online_players_flagged[<flag_name>]>, <PlayerTag.worldguard.test_flag[<name>].at[<location>]>, ...
Returns a material object constructed from the input value.
Refer to !objecttype MaterialTag.
MaterialTag
Is that video, an example how it should looks like at the end?
maybe you get a long with the on player walks event.
!e walks
!e player walks
Player
This event fires very very rapidly!
player walks
when a player moves in the slightest.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.old_location> returns the location of where the player was.
<context.new_location> returns the location of where the player is.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Im looking to know how i can save the last location on player standing at.
!e steps on block
!e entity steps on block
Paper
Paper
This event may fire very rapidly.
entity steps on block <entity> steps on <material>
when a non-player entity steps onto a specific block material. For players, use !event player steps on block.
<context.entity> returns an EntityTag of the entity stepping onto the block.
<context.location> returns a LocationTag of the block the entity is stepping on.
<context.previous_location> returns a LocationTag of where the entity was before stepping onto the block.
<context.new_location> returns a LocationTag of where the entity is now.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
# Announce the name of the entity stepping on the block and the material of block.
on entity steps on block:
- announce "<context.entity.name> stepped on a <context.location.material.name>!"
# Announce the material of the block a sheep has stepped on.
on sheep steps on block:
- announce "A sheep has stepped on a <context.location.material.name>!"
# Announce that a sheep has stepped on a diamond block.
on sheep steps on diamond_block:
- announce "A sheep has stepped on a diamond block! Must be a wealthy sheep!"
!t locationtag.find_spawnable_blocks_within
Returns a list of blocks within a radius, that are safe for spawning, with the same logic as !tag LocationTag.is_spawnable.
Note: current implementation measures the center of nearby block's distance from the exact given location.
Result list is sorted by closeness (1 = closest, 2 = next closest, ... last = farthest).
finding
ListTag(LocationTag)
just find a spawnable block nearby instead
teleport them there
with the event
make sure to include these in the teleport command too
!t locationtag.with_yaw
Returns a copy of the location with a changed yaw value.
identity
LocationTag
!t locationtag.with_pitch
Returns a copy of the location with a changed pitch value.
identity
LocationTag
- actionbar "<&c>You can't swim"
- teleport <player> <context.previous_location.find_spawnable_blocks_within[10].first.with_yaw[<player.location.yaw>].with_pitch[<player.location.pitch>]>```
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@sly marsh