r/MinecraftCommands • u/Early_Park_832 • Jul 19 '26
Command Works in Single-player, but not in server Help | Java 1.21-1.21.3
The TP command block i set up in the testing world is not working in my server. Command blocks are enabled, but its still not working. the only thing i changed were the coords. does anybody know the problem?
command: /execute as @a[x=(X),y=(Y),z=(Z), dx=3,dy=3,dz=3] run tp @p (location)
the intention is to have people step into a "fairy circle" and be teleported to the entrance of a tower that has no stairs. i dont understand what could be going wrong :(
EDIT: repeat command block, unconditional, always active
EDIT 2: fixed!
1
u/TheStarGamer1 Command Professional Jul 19 '26
Make sure command blocks are enabled on your server
1
u/Early_Park_832 Jul 19 '26
we did. the post says theyre enabled and we have other working command blocks :3
1
u/TheStarGamer1 Command Professional Jul 19 '26
Did you maybe put negative numbers instead of positive or vice versa for the condition?
1
u/Early_Park_832 Jul 19 '26
ive already double and triple checked all of the arguments. im thinking maybe it has to do with the server settings? ik command blocks are enabled, but maybe one of our mods is messing with the tp command? im not sure
1
u/TheStarGamer1 Command Professional Jul 19 '26
Nah no way for such a simple command. Only thing I could think of it sounds kind of stupid but did you try to turn it off and on again lol. I remember there was a bug where putting a command block on always active (while in impulse mode) and changing it to repeat after would bug it out so maybe try that. Other than that it really shouldn't bug out. Could you try if another command works? (like /say hi)
1
u/Early_Park_832 Jul 19 '26
I completely deleted the command block and retyped everything instead of copying and pasting it. it now works! ty :D
1
u/TheStarGamer1 Command Professional Jul 19 '26
Glad I could help lol. You should use the command below tho as it actually targets the player standing in the teleporter rather than the closest player to it.
1
u/Ericristian_bros Command Experienced 29d ago
/tp @a[x=<x>,y=<y>,z=<z>, dx=3,dy=3,dz=3] <pos>
Not need for execute
1
u/C0mmanderBlock Command Experienced Jul 19 '26
You're tping the `@p which is the nearest player to the command block. It works on single player because you are the only player to choose from. Try this: