So, you're making a map. You've spent a while making some redstone circuitry, and then some time later, you build something that your realize is a few blocks too far to the left. You use the /clone command to move the block to the correct position, but something distracts you, or you're tired, or you're just plain not paying attention, and you enter one of the coordinates incorrectly, which overlaps with some of that complex circuitry you spent an hour making. Great, now you either need to go restore a backup, or remake the circuits over again. If only there was someway to just undo it all.
It doesn't matter how good you are, how experienced you are, how amazing you are--you are going to make a mistake with a command someday, and likely several. The consequences for such a mistake can vary in the amount of time required to fix it, but you really wish you could just fix it instantly as easily as pressing Ctrl+Z in a paint program.
The Solution
A new command would be added: /undo . This would reverse the effects of most commands, and is saved per player. However, due to possible performance issues and the huge amount of data that would have to be written to each one, /undo cannot be used by a command block. /undo is an operator-only command and requires an operator level of 3 or higher.
How it works
Whenever you use a command that can be undone, the game saves all the data involved with the data prior to using the command, as well as the effect. When you use /undo the first time, it reverses the effect of that command as well as it can. Using /undo a second time will reattempt the original command. On a server, there is 15 second delay between using the /undo command per person.
To reduce file size, the information saved to a player.dat file from the /undo command is deleted upon exiting the world.
You can choose to allow undoing of specific commands on a server in the server_properties file.
While the chat is open, pressing Ctrl+Z will undo (or redo) the last executed command.
Effects of Specific Commands
/achievement
Removes an achievement if given, or gives back a taken achievement.
/blockdata
Returns the blockdata of the specified block to what it was.
/clear
Gives the item(s) taken back to the player they've been taken from, NBT and all.
/clone
Returns the area that the clone has taken up back to it's former state.
/defaultgamemode
Returns the default game mode to its former state.
/difficulty
Returns the difficulty to it's previous level
/effect
Removes an applied effect, although it does not remove what it has already done (for example, if you had gained two hearts from regeneration, you would not lose those hearts). Also gives back a removed effect for the duration it had when it was removed.
/enchant
Removes the enchantment from the item.
/entitydata
Sets the entity's data to its previous state.
/execute
Undoes the executed command.
/fill
Empties the filled area, then fills it back in with what it had previously contained.
/gamemode
Sets the gamemode for the player back to what it had been previously.
/gamerule
Returns the gamerule to its prior value.
/give
Take the item away.
/particle
Makes the particle cease to exist.
/playsound
Cuts the sound short.
/replaceitem
The replaced item becomes what it had been before.
/scoreboard
Reverses the effect of the last /scoreboard command. Scoreboards are too complicated to go into too much detail.
/setblock
Sets the block to what it had been prior.
/setworldspawn
Returns the world spawn point to what it had been previously.
/summon
Kills the entity that had just been summoned, if it still exists. The entity does not drop anything.
/teleport and /tp
Returns the player to where they had been previously.
/time
Sets the time to what it had been before the time change.
/toggledownfall
Toggles the downfall again.
/weather
Sets the weather to what it had been before.
/worldborder
Returns the world's border to it's previous state.
/xp
Returns the player's xp level to what it had been previously.
Changelog
Edit 2:Added the ability to undo a specific command
Edit 1:Added /summon and an additional poll
A few of the things it would undo seem a bit unnecessary, but for the most part, this is something that would be very useful.
You'd not believe how many times I could have used this in the past.
And you explained quite well how it could be pulled off.
Full support
Thanks for the support! I wanted to be able to undo any command that didn't effect a server or could be difficult to work around and possibly exploit (how would you undo /kill?) , so even if you're unlikely to undo a command, I decided to include it.
This seems rather useful, actually. What I hate the most about commands is if you mess up (or do something on purpose...) you can't UNDO that action, no matter how potentially destructive the command IS.
I only have one request, why don't you make a field AFTER the "/undo"? For example, if I did a command I DIDN'T want and then a command I DID want it would rollback the command I had just done. The field afterwards should be the commands name, for example, "/undo clone".
Partial Support
I thought about that, but I ended up not including it due to the potentially huge amount of data needed to be stored per player.
However, if enough people want it, I'll add that to the main suggestion. I'll add a poll.
Realistically, that huge amount of data should feasibly only be around a couple mb. If it deletes everything, say, 10-20 actions ago, it should be fine.
Rollback Post to RevisionRollBack
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
Realistically, that huge amount of data should feasibly only be around a couple mb. If it deletes everything, say, 10-20 actions ago, it should be fine.
Would you rather it save the last 10 commands, or one instance of every command?
How is it a huge amount of data? There's not that much commands in Minecraft.
I'm more worried about the potential hit to server performance. All the potential block data--all the potential NBT that would have to be saved per player from excessive use of the /fill command.
However, if someone else wants this as well, I add it in.
I'm not sure what you mean by one instance of every command.
And now that I think of it, "remembering" a large fill command could use up a bit of space (>1 MB, but still), because it would have to recall every block type and possibly containers. Still, not too big though.
And I can confirm that this wouldn't do much to performance at all.
I have coreprotect and WE running on my 1.9.4 Spigot server. Dual core 2.3ghz, 2gb total ram (1gb to the server)
Pitiful specs, but it works quite fine, and rolling back with coreprotect works very well.
Rollback Post to RevisionRollBack
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
I'm not sure what you mean by one instance of every command.
And now that I think of it, "remembering" a large fill command could use up a bit of space (>1 MB, but still), because it would have to recall every block type and possibly containers. Still, not too big though.
And I can confirm that this wouldn't do much to performance at all.
I have coreprotect and WE running on my 1.9.4 Spigot server. Dual core 2.3ghz, 2gb total ram (1gb to the server)
Pitiful specs, but it works quite fine, and rolling back with coreprotect works very well.
I mean it would save what every command has done, but only the last time it was executed: save the results of the last /fill, the last /tp, etc.
This would allow you to pick a specific command to undo (/undo fill).
The other method is picking a specific number of commands to undo (/undo 3 would undo the last three commands. You could use negative numbers to redo.)
Oh my god, YES. I ALWAYS wanted a Ctrl+Z type command/function in minecraft!
MAXIMUM SUPPORT
Thank you! That actually gave me an idea. How about, when the chat is open and you have sufficient permissions, pressing Ctrl+Z will automatically execute the undo command for the last command you performed?
Thank you! That actually gave me an idea. How about, when the chat is open and you have sufficient permissions, pressing Ctrl+Z will automatically execute the undo command for the last command you performed?
I picked level 3 op because some of the commands that it can undo require level 3.
But, thinking about it, it should probably be configurable in the server_properties file.
Otherwise, do you support?
Of course! In my opinion, "customer choice" should be everywhere. Instead of developers putting in fixed options, they should always put in choices and let the end users decide; so as long as I can configure it to how I want, you have my full support 100%.
How would it handle a large ****up though? Would Undo only undo the last thing? That would be fine if you drop a bucket of lava but if you need to undo 10 minutes of work then one undo won't cut it. Would the undo just go back infinitely, for a certain amount of time, or since you logged in that day? What about when other people disturb your work and effect how things will be undone? Would there be a time limit? Would it only undo items nearby or anything?
Of course! In my opinion, "customer choice" should be everywhere. Instead of developers putting in fixed options, they should always put in choices and let the end users decide; so as long as I can configure it to how I want, you have my full support 100%.
How would it handle a large ****up though? Would Undo only undo the last thing? That would be fine if you drop a bucket of lava but if you need to undo 10 minutes of work then one undo won't cut it. Would the undo just go back infinitely, for a certain amount of time, or since you logged in that day? What about when other people disturb your work and effect how things will be undone? Would there be a time limit? Would it only undo items nearby or anything?
I'm afraid I have some bad news for you then. Partially because of the reasons you listed, among others, /undo can only be used to reverse the effects of other commands, due to the fact that they can be easily logged, and the lack of conflicts that could be caused in multiplayer. Actions directly executed by a player, such as placing a block, cannot be undone, due to how difficult it would be to record and fix.
The Problem
So, you're making a map. You've spent a while making some redstone circuitry, and then some time later, you build something that your realize is a few blocks too far to the left. You use the /clone command to move the block to the correct position, but something distracts you, or you're tired, or you're just plain not paying attention, and you enter one of the coordinates incorrectly, which overlaps with some of that complex circuitry you spent an hour making. Great, now you either need to go restore a backup, or remake the circuits over again. If only there was someway to just undo it all.
It doesn't matter how good you are, how experienced you are, how amazing you are--you are going to make a mistake with a command someday, and likely several. The consequences for such a mistake can vary in the amount of time required to fix it, but you really wish you could just fix it instantly as easily as pressing Ctrl+Z in a paint program.
The Solution
A new command would be added: /undo . This would reverse the effects of most commands, and is saved per player. However, due to possible performance issues and the huge amount of data that would have to be written to each one, /undo cannot be used by a command block. /undo is an operator-only command and requires an operator level of 3 or higher.
How it works
Whenever you use a command that can be undone, the game saves all the data involved with the data prior to using the command, as well as the effect. When you use /undo the first time, it reverses the effect of that command as well as it can. Using /undo a second time will reattempt the original command. On a server, there is 15 second delay between using the /undo command per person.
To reduce file size, the information saved to a player.dat file from the /undo command is deleted upon exiting the world.
You can choose to allow undoing of specific commands on a server in the server_properties file.
While the chat is open, pressing Ctrl+Z will undo (or redo) the last executed command.
Effects of Specific Commands
/achievement
Removes an achievement if given, or gives back a taken achievement.
/blockdata
Returns the blockdata of the specified block to what it was.
/clear
Gives the item(s) taken back to the player they've been taken from, NBT and all.
/clone
Returns the area that the clone has taken up back to it's former state.
/defaultgamemode
Returns the default game mode to its former state.
/difficulty
Returns the difficulty to it's previous level
/effect
Removes an applied effect, although it does not remove what it has already done (for example, if you had gained two hearts from regeneration, you would not lose those hearts). Also gives back a removed effect for the duration it had when it was removed.
/enchant
Removes the enchantment from the item.
/entitydata
Sets the entity's data to its previous state.
/execute
Undoes the executed command.
/fill
Empties the filled area, then fills it back in with what it had previously contained.
/gamemode
Sets the gamemode for the player back to what it had been previously.
/gamerule
Returns the gamerule to its prior value.
/give
Take the item away.
/particle
Makes the particle cease to exist.
/playsound
Cuts the sound short.
/replaceitem
The replaced item becomes what it had been before.
/scoreboard
Reverses the effect of the last /scoreboard command. Scoreboards are too complicated to go into too much detail.
/setblock
Sets the block to what it had been prior.
/setworldspawn
Returns the world spawn point to what it had been previously.
/summon
Kills the entity that had just been summoned, if it still exists. The entity does not drop anything.
/teleport and /tp
Returns the player to where they had been previously.
/time
Sets the time to what it had been before the time change.
/toggledownfall
Toggles the downfall again.
/weather
Sets the weather to what it had been before.
/worldborder
Returns the world's border to it's previous state.
/xp
Returns the player's xp level to what it had been previously.
Changelog
Edit 1:Added /summon and an additional poll
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Yes.
Yes.
YES.
A few of the things it would undo seem a bit unnecessary, but for the most part, this is something that would be very useful.
You'd not believe how many times I could have used this in the past.
And you explained quite well how it could be pulled off.
Full support
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
I make YouTube vidoes! Why not go check em out?
My specs:
R7 1700 (8c/16t) @ 3.8ghz
Cryorig H7 cooler
G1 Gaming GTX 1080 8gb @ ~2000mhz core
16gb DDR4 3200mhz ram
250gb 850 EVO SSD
240gb Sandisk SSD Plus
1tb WD Blue 7200rpm HDD
1tb Generic 2.5" 7200rpm HDD
500gb WD 7200rpm HDD
Win 10
3x 24" 1080p Monitors @75hz
Click me, and let all your dreams come true....
Just two words for this suggestion.
ABSOLUTE SUPPORT
I've needed a thing like this since ages...
Checkout my mod about Craftable End Portal frames!
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2656035-craftable-end-portal-frames
Check out my YT Channel https://www.youtube.com/channel/UCaJyJFtI-BkO1a2OJTZbofw Please subscribe and like my vidz!
When was the last time I wanted to /undo? Oh yeah, today!
FULL SUPPORT
Thanks for the support! I wanted to be able to undo any command that didn't effect a server or could be difficult to work around and possibly exploit (how would you undo /kill?) , so even if you're unlikely to undo a command, I decided to include it.
Thank you!
I thought about that, but I ended up not including it due to the potentially huge amount of data needed to be stored per player.
However, if enough people want it, I'll add that to the main suggestion. I'll add a poll.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Realistically, that huge amount of data should feasibly only be around a couple mb. If it deletes everything, say, 10-20 actions ago, it should be fine.
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
I make YouTube vidoes! Why not go check em out?
My specs:
R7 1700 (8c/16t) @ 3.8ghz
Cryorig H7 cooler
G1 Gaming GTX 1080 8gb @ ~2000mhz core
16gb DDR4 3200mhz ram
250gb 850 EVO SSD
240gb Sandisk SSD Plus
1tb WD Blue 7200rpm HDD
1tb Generic 2.5" 7200rpm HDD
500gb WD 7200rpm HDD
Win 10
3x 24" 1080p Monitors @75hz
Click me, and let all your dreams come true....
Would you rather it save the last 10 commands, or one instance of every command?
I'm more worried about the potential hit to server performance. All the potential block data--all the potential NBT that would have to be saved per player from excessive use of the /fill command.
However, if someone else wants this as well, I add it in.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
I'm not sure what you mean by one instance of every command.
And now that I think of it, "remembering" a large fill command could use up a bit of space (>1 MB, but still), because it would have to recall every block type and possibly containers. Still, not too big though.
And I can confirm that this wouldn't do much to performance at all.
I have coreprotect and WE running on my 1.9.4 Spigot server. Dual core 2.3ghz, 2gb total ram (1gb to the server)
Pitiful specs, but it works quite fine, and rolling back with coreprotect works very well.
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
I make YouTube vidoes! Why not go check em out?
My specs:
R7 1700 (8c/16t) @ 3.8ghz
Cryorig H7 cooler
G1 Gaming GTX 1080 8gb @ ~2000mhz core
16gb DDR4 3200mhz ram
250gb 850 EVO SSD
240gb Sandisk SSD Plus
1tb WD Blue 7200rpm HDD
1tb Generic 2.5" 7200rpm HDD
500gb WD 7200rpm HDD
Win 10
3x 24" 1080p Monitors @75hz
Click me, and let all your dreams come true....
I mean it would save what every command has done, but only the last time it was executed: save the results of the last /fill, the last /tp, etc.
This would allow you to pick a specific command to undo (/undo fill).
The other method is picking a specific number of commands to undo (/undo 3 would undo the last three commands. You could use negative numbers to redo.)
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Ah, yes, sorry, I see now.
Yeah, I think the instanced one would be much more practical.
I'm more likely to do something regrettable, and then something else, than to do something regrettable twice.
Want to host a dedicated server yourself, easily, and for free? Click here!
Need to post a DXDiag log and don't know how? Here you go!
I make YouTube vidoes! Why not go check em out?
My specs:
R7 1700 (8c/16t) @ 3.8ghz
Cryorig H7 cooler
G1 Gaming GTX 1080 8gb @ ~2000mhz core
16gb DDR4 3200mhz ram
250gb 850 EVO SSD
240gb Sandisk SSD Plus
1tb WD Blue 7200rpm HDD
1tb Generic 2.5" 7200rpm HDD
500gb WD 7200rpm HDD
Win 10
3x 24" 1080p Monitors @75hz
Click me, and let all your dreams come true....
There's a lot of competition for the most recent suggestion today.
All right, with this feedback I'll add this to the suggestion later.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Oh my god, YES. I ALWAYS wanted a Ctrl+Z type command/function in minecraft!
MAXIMUM SUPPORT
Thank you! That actually gave me an idea. How about, when the chat is open and you have sufficient permissions, pressing Ctrl+Z will automatically execute the undo command for the last command you performed?
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Support! Sounds Good To Me!
Alright, I've added the new behavior to the main post.
Thank you!
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
That sounds pretty darn handy to me!
I don't agree with the level 3 op only; there should definitely be an option to specify which level or allow everyone.
I picked level 3 op because some of the commands that it can undo require level 3.
But, thinking about it, it should probably be configurable in the server_properties file.
Otherwise, do you support?
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Of course! In my opinion, "customer choice" should be everywhere. Instead of developers putting in fixed options, they should always put in choices and let the end users decide; so as long as I can configure it to how I want, you have my full support 100%.
How would it handle a large ****up though? Would Undo only undo the last thing? That would be fine if you drop a bucket of lava but if you need to undo 10 minutes of work then one undo won't cut it. Would the undo just go back infinitely, for a certain amount of time, or since you logged in that day? What about when other people disturb your work and effect how things will be undone? Would there be a time limit? Would it only undo items nearby or anything?
I'm afraid I have some bad news for you then. Partially because of the reasons you listed, among others, /undo can only be used to reverse the effects of other commands, due to the fact that they can be easily logged, and the lack of conflicts that could be caused in multiplayer. Actions directly executed by a player, such as placing a block, cannot be undone, due to how difficult it would be to record and fix.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com