How do I stop my constant teleporting? [duplicate]

I was playing Minecraft and I decided to make a train so that when it hits the detector rail I teleport using a command block. I connected the command block to the detector rail and on the command block I typed in a random x y z and when I tried it I spawn in the clouds up high in the sky. When I fall back down to earth the train hits the detector rail again and I teleport back up again. How can I get out of this cycle?


Solution 1:

If your playing on a server, you can simply disable command blocks with the following configuration line in the server.properties file:

enable-command-block = false

Then destroy or modify the offending command block.

Solution 2:

Quit and log back in. If you can unload the chunk that the train is in it will stop activating the command block. If it is in a block that remains loaded, such as spawn on a server, I'm not sure there's much you can do without someone else's help or using an external editor.

Solution 3:

Wow this is an old thread -

Well, I was having the same issue - here's the vanilla fix - no plugins:

This is assuming you have daily backups and access to Minecraft 'world' directory via FTP on the hosted site.

Logout of Minecraft and stop the server.

Login to the FTP and backup the current 'broken world' to your local drive.

Make sure you have a backup of your world, if so, delete the one on the FTP and copy a day old backup of your world from your local drive or the server side to the FTP.

Start the server, login to Minecraft and go to the location of where the offending looping command block would be on the 'broken world', and write down the x y z, x y z location (Press F3 for info).

Stop the server, login to the FTP and delete the day old backup 'world' file.

Copy the 'broken world' file from your local drive to the FTP.

Start the server, login to Minecraft.

Type this op command:

/fill location of command block minecraft:air

example:

/fill 19 53 351 26 54 350 minecraft:air

If that works, save it.

/save-all

Hope that helps, SP