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

Fix to mines not resetting from PC-imported worlds #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ExileWeb
Copy link

Fix for the reset task failing for PC imported worlds, as the world name isn't correct

Fix for the reset task failing for PC imported worlds, as the world name isn't correct
@falkirks
Copy link
Owner

falkirks commented Oct 9, 2020

Thanks for making this PR. I don't have the ability to test PRs at this point so I have been holding off merging. I think PC users can just rename the folder, right?

@ExileWeb
Copy link
Author

ExileWeb commented Oct 9, 2020

Yeah if they change the config value for the mine name to the folder name then it works too.

@ExileWeb
Copy link
Author

I'd like to resolve this PR/issue as I'm still seeing people having trouble due to this.

After testing I'll propose a more robust PR which explicitly checks on mine creation if the Level getName method matches the Level getFolderName method. The few lines of code added won't affect performance, but I'm sure my previous one line change would be sufficient.

If the two functions don't match then it's definitely not a Pocketmine-created level, hence must be imported from a different level format (PC) or different LevelDB version; in this case the Level getFolderName method returns the correct level name value to store in the config file for use in further calls.

If you don't want to change the plugin till PM-4 then close this PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants