#Spawn all Joining Players (not just new players) at Specific Location

1 messages · Page 1 of 1 (latest)

quick olive
#

My end goal is to make a "hub-like" world in my velocity-powered server. Regardless of how a player joins, i want that player to spawn at a specific location in the world, or as a workaround be teleported to a specific location at spawn. i am quite familiar with programming, but not quite with datapacks in particular. i have created a datapack, but i am unfamiliar with the datapack file structure.

i used AI to make a template of what i am looking for, but ive quickly realizes that that is not a very smart idea, so I joined this discord to ask for help. i will send screenshots of what i have in a moment.

dark halo
#

Ok what are you currently stuck with? What have you got so far?

quick olive
#

let me send some screenshots

#

if formatted code blocks are perferred, i can provide that as well

quick olive
#

so far, i cant figure out how to even run something every tick. ill look at some documentation right now to see what im missing

#

starting to understand it better now

#

everything defined under the tick minecraft tag will run every tick, which executes the join mcfunction

#

that join function will teleport every player that does not have the joined tag to the location specified, then immediately applies the tag to the player

#

curiously, no tags get applied when i reload

dapper spruce
#

tick.json is supposed to be at data>minecraft>tags

quick olive
#

Ah ok

#

ive moved the file, but nothing happens on reload still

quick olive
#

alright, i put it in data/minecraft/tags/function, and that worked, but now its teleporting me every single frame

#

i still have to figure out how to detect a player actually joining

#

i got it working! heres my end result code

lime crownBOT
#

join.mcfunction

execute as @a[ scores = { join = 1.. }] at @s run tp @s -82.5 70 -27.5
scoreboard players reset @a join

tick.mcfunction

function joinspawn:join