Skip to content
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

disabling auto-save doesen't work #272

Open
Sulfatezzz opened this issue Jul 10, 2018 · 3 comments
Open

disabling auto-save doesen't work #272

Sulfatezzz opened this issue Jul 10, 2018 · 3 comments

Comments

@Sulfatezzz
Copy link

Sulfatezzz commented Jul 10, 2018

Actual Behavior

It's currently not possible to disable auto-save in nukkit.
Neither in-game or via plugin.

Steps to Reproduce

  1. run command /save-off
  2. place/destroy blocks
  3. unload world (via plugin or restart server)
  4. changes are still there

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@PetteriM1
Copy link
Collaborator

I think Nukkit saves worlds when it unloads them

@Sulfatezzz
Copy link
Author

Sulfatezzz commented Jul 10, 2018

No I think it shouldn't. Take a look at

Level.java@404
It checks for autoSave statement before

public void close() {
        if (this.getAutoSave()) {
            this.save();
        }
        this.provider.close();
        this.provider = null;
        this.blockMetadata = null;
        this.temporalPosition = null;
        this.server.getLevels().remove(this.levelId);
        this.generators.clean();
    }

@bddvlpr
Copy link

bddvlpr commented Jul 31, 2018

I'm quite sure auto-save means the server should automatically save after a dedicated period of time, not on shutdown. Even though the close method gets called, it still gets saved on shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants