-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/mv clone command #780
/mv clone command #780
Conversation
Brief read is looking good, will test on or before this weekend and pull, thanks! |
My code doesn't copy over world properties set with |
Ideally it would just make an in memory copy of one of the EDIT: In addition to what you're doing with the filesystem. |
Before we pull this I'd like to see the file copy method moved from Multiverse-Adventure's FileUtil to cores. |
And here it is: 085c7a1 |
Hmm, and it would appear if you use our method you'll have to delete the uid.dat afterwards. I still think that would be the better course of action. |
Maybe modifying the utils method to allow deletion of the uid as a parameter? |
Now using |
} | ||
|
||
private void deleteUID(File worldFolder) throws IOException { | ||
File uidFile = new File(worldFolder, "uid.dat"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation
Sorry @mathphreak had a busy weekend (read: slacker playing the Guild Wars 2 beta...) I'll see about looking at it sometime this week, won't be tonight. It looks as if @main-- and @dumptruckman have already given their input, and you've fixed all they've asked. |
So... After more careful review I've decided that the world copy will have to be asynchronous or else copying a huge world folder will lag out your server. As a side effect of being asynchronous, you would have to kick everyone out of the fromWorld and unload it BEFORE you copy it. Since this is kind of a "what???" procedure, it would probably be best to require and /mvconfirm first that warns them what is going to happen. |
As a side effect of requiring |
Nice move @mathphreak I agree entirely. We try to keep a lot of the logic out of the actual command class as it keeps those cleaner. I'll look at it tonight or tomorrow; test and pull. |
Also @main-- I appreciate your critique of tabbing, but I'll just have IntelliJ zap all the imported files :P |
What's this @mathphreak? I'm actually looking at this PR now?!?! Blasphemy! Seriously. Sorry for the delay.
More to come as I continue to test and merge. |
Overall, works great! |
Adding /mv clone per #779