Minecraft Data Packs / Other

World Join Message

  • check_circle Functions
  • 2,580 views, 4 today
  • 308 downloads, 0 today
  • 6
  • 6
  • 2
Noiro1's Avatar Noiro1
Level 46 : Master Imposter
30
How to use:
1. Extract the pack.
2. Go to the path: World Join Message\data\type\functions\joined.mcfunction.
3. Change the EXAMPLE to be a message of your choice.
4. Change EXAMPLELINK to be a message that players click on to enter a website, or if you don't want a link just remove the EXAMPLELINK.
5. Change EXAMPLEWEBSITE to be the website that players get sent to, after clicking the EXAMPLELINK.
(ONLY WORKS IF THERE IS LINK TO CLICK ON)
6. Drag the extracted version of the datapack into the datapacks folder, then restart the world/server.
CompatibilityMinecraft 1.17
toMinecraft 1.19
Tags

Create an account or sign in to comment.

3
07/18/2022 9:04 am
Level 39 : Artisan Miner
Lordphenex
Lordphenex's Avatar
Your datapack could be improved :
In your main function you should use "as @a[​tag=!joined]" instead of at @a[​tag=!joined]
This will run the function as every new player.
Thus, in the joined function, you can use "tag @s add joined" and you must use "tellraw @s <message>", because as it is now, all the players in the world will get the message when a new player arrives.

Using @s instead of @p make the code much more efficient.
Also keep in mind that doing at or as @a will play the sub-command at each position or as each player. So if you have 10 players loging in the same tick, the sub command would be runned 10 times.

I hope this will help you.
1
07/19/2022 3:02 amhistory
Level 46 : Master Imposter
Noiro1
Noiro1's Avatar
If you want you can improve my datapack and post it yourself, you are free to use any of my content as you wish.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome