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

Return false for isChunkGenerated with unknown API #58

Closed

Conversation

pop4959
Copy link
Member

@pop4959 pop4959 commented Dec 24, 2021

Extremely minor change/nitpick but isChunkGenerated should not return true when the API cannot be detected -- for example, in the brief duration that the paper version could not be detected correctly (due to the existence of release candidate builds). This is generally a bad assumption to make and can lead to unexpected behavior in plugins.

@electronicboy
Copy link
Member

Issue with this is that you can argue for it both ways, saying that chunks are already generated seemed to be the lesser of two evils at the time iirc

@pop4959
Copy link
Member Author

pop4959 commented Dec 24, 2021

Yeah I suppose that's true, I think I might have been a bit hasty to make this PR since this came to mind when looking at this repo again, after this issue having caused me some grief.

The better fix is clearly something like discussed in #53 (detect features rather than environment where possible). Not sure how it'd help much here though given that Spigot does have the same method... but I care about whether the implementation is provided by Paper as Spigot's does not always return accurately.

Can't think of a better solution right now but this one is clearly a bit too lazy, so I'll close for now.

@pop4959 pop4959 closed this Dec 24, 2021
@pop4959 pop4959 deleted the chunk-is-generated-unknown-false branch December 24, 2021 00:45
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 this pull request may close these issues.

2 participants