I am new to running a server with Apex hosting. I want to display a simple message at the center of the screen whenever someone logs into the server. How do I do this?
I would like a solution for both Java and Bedrock.
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this communityI am new to running a server with Apex hosting. I want to display a simple message at the center of the screen whenever someone logs into the server. How do I do this?
I would like a solution for both Java and Bedrock.
First create a scoreboard to track new players:
scoreboard objectives add LeaveGame custom:leave_game
Then check in a ticking function if someone has not a score of 0 and if yes, display a title (a message in the middle of the screen) with the player name to them:
execute as @a unless score @s LeaveGame matches 0 run title @a title [{"selector":"@s"},{"text":" logged in"}]
scoreboard players set @a LeaveGame 0
I never played Bedrock Edition, but according to the wiki scoreboards can only use the dummy
criterion, which makes the concept above impossible. If it's enough that the title only appears once, when a new player joins, you can use a tag:
execute @a[tag=!Tagged] ~ ~ ~ title @a title [{"selector":"@s"},{"text":" logged in"}]
tag @a[tag=!Tagged] add Tagged
Not tested, please correct me if I'm wrong.
/title
?