Command block doesn't see radius on teleport

Command block doesn't see radius on teleport - Blonde Girl in White T-shirt Leaning on White Block

I am using two commands via command block:-

scoreboard teams join No-PVP @p[3743,70,3954,32,team=!No-PVP]
scoreboard teams join PVP @p[3743,70,3954,100,rm=36,team=!PVP]

Now, these commands work fine when you enter and leave the radius specified... but when you're inside the radius and teleport away from it, you don't seem to leave the team. It looks as if the command block isn't seeing that I have moved. What is causing this and how can I fix it?



Best Answer

The issue lies with the second command:

scoreboard teams join PVP @p[3743,70,3954,100,rm=36,team=!PVP]

Using 4 arguments without their keywords makes the game read them as x, y, z, and r. Your players are only assigned to the PVP team when they are between 36 and 100 blocks away from the specified coordinates. If they teleport farther away, the command does not apply to them.

The solution is to simply remove 100, from the command to disable the upper limit.




Pictures about "Command block doesn't see radius on teleport"

Command block doesn't see radius on teleport - Boat
Command block doesn't see radius on teleport - Brown Human Eye
Command block doesn't see radius on teleport - Unrecognizable woman holding paw of dog





5 reasons why your command block invention is not working




More answers regarding command block doesn't see radius on teleport

Answer 2

If you're using a spigot server or such modifications care about the fact spawn chunks can be not kept loaded if you don't use a plugin for it like ChunkLoader.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Ruslan Alekso, Kibo FotoArt, Subin, Ivan Babydov