2

I am working on a map, and in this map's function I have a system that gives players who rejoin the map a /title message (rejoining meaning leaving the world then coming back). At first it seemed to be working fine, but I soon realized that occasionally I came on and had no score, so I wouldn't be /tp-ed to the spawn and I wouldn't get the message. I know I have no score because it doesn't work, then I leave and rejoin and then it does work.

These are the commands I am currently using:

/scoreboard objectives add leave minecraft.custom:minecraft.leave_game
/tp @a[scores={leave=1}] 0 5 0
/title @a[scores={leave=1}] title {"text":"Welcome back!","color":"aqua"}
/scoreboard players reset @a[scores={leave=1}] leave

It worked before. I have tried resetting the score only if the player is at the spawn, but it still does not work sometimes. It is crucial that I get this working every time. Is this a bug? Is there any workaround or a substitute, or am I just stupid?

EDIT

I have tested my map multiple times. These are my results:

-10 times I left the game normally, flying a distance away from the spawn before quitting. Each time was successful.

-10 times I opened to LAN before quitting. Nine times worked.

-5 times I reloaded and immediately quit. Each time failed.

-10 times I slightly edited and saved the function, five times in the game and five times not in the game. Each time was successful (and there were no synax errors).

-2 times I crashed the game by pressing F3 + T, making sure the game auto saved before I did. Not only did they fail but the next few logins after that failed too.

-I retested opening to LAN about 10 more times. I noticed it tended to fail the most when I was falling or when I immediately quit afterwards. At one point it took FOUR CONSECUTIVE LOGINS, without LAN active but after a LAN failure, to get my message.

Now I'm really scared about this issue.

8
  • Which version does "before" mean (before it worked) and which version are you in now? Commented Mar 27, 2019 at 14:43
  • @FabianRöling worked before means these problems haven't shown themselves for months after I installed the commands. I have only made this map in 1.13 Commented Mar 27, 2019 at 14:45
  • @FabianRöling Although the problem not showing itself for that long in the beginning wouldn't necessarily prove they didn't exist. Commented Mar 27, 2019 at 14:54
  • No, I meant which exact versions. Do you mean it first worked reliably in 1.13.0 and now is suddenly unreliable in 1.13.0? Commented Mar 27, 2019 at 16:12
  • 1
    I just left and rejoined 10 times in 19w13a and it successfully tracked it every time. Of course it's a different version, but they didn't fix that many bugs since then. :D Maybe try just leaving and rejoining multiple times in a row and see if that works every time, without triggering any commands in the meantime (new world for example). Then, if you have a situation where it doesn't work, try that multiple times in a row. Commented Mar 27, 2019 at 17:49

1 Answer 1

-1

Try going back to a previous version, and not a snapshot. Also, you could move the map files to somewhere else, restart Minecraft (maybe reinstall if you have to), put the files back, play, retype that command in, and it might work again. Also, are you using a command block, you could check the settings on that command block if they're right or try the other settings on it.

3
  • Thanks for the help, but I'm not in a snapshot and I'm pretty sure the world itself is the problem, since it also has serious issues when /tp and /kill are used :P Commented Apr 5, 2019 at 22:38
  • /tp, try using /teleport, i had to use it when /tp wasn't working for me
    – Dragonary
    Commented Apr 6, 2019 at 6:29
  • It's not like that. /tp teleports people, but to everyone else it looks like they shake incredibly violently in the same spot. It's a glitch or something, probably due to having once disabled the vanilla datapack. Thanks anyway though. Commented Apr 6, 2019 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.