0

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.

5
  • With 'onscreen' you mean in chat or as a /title?
    – IceFreez3r
    Apr 8 at 9:29
  • @IceFreez3r yes I think so. I can't see how to display this automatically when someone logs into the server.
    – C26
    Apr 8 at 10:25
  • 2
    @C26 They were asking which one you wanted: As a message in chat, or as a large block of text directly in the center of the screen?
    – Corsaka
    Apr 8 at 12:12
  • @Corsaka oh sorry, I meant a block of text in the centre of the screen :)
    – C26
    Apr 9 at 14:45
  • Don't Minecraft servers already do this by default? (The "<player> has joined" and "<player> has left" messages)
    – aytimothy
    Apr 10 at 11:05

1 Answer 1

2

Java Edition:

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

Bedrock Edition

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.

3
  • If you're running a Spigot server over Geyser/Floodgate (basically have a protocol translator), ignore the Bedrock answer (use the host server answer).
    – aytimothy
    Apr 11 at 6:35
  • This is great, thank you, but how do I make it a display a message in the centre of the screen all the time at login regardless of level/score?
    – C26
    Apr 11 at 11:22
  • I'm not sure, if I understand you correctly. The scoreboard updates automatically every time a player leaves the game. This means, that completely new players don't have a score and other players have a score of 1, when they login. It doesn't require you to manually set a score.
    – IceFreez3r
    Apr 12 at 7:26

Not the answer you're looking for? Browse other questions tagged .