Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat/litematic support #233
Feat/litematic support #233
Changes from 10 commits
bf6628e
7073d43
2cf62e8
be61c4d
60fdb0a
689a5d3
3b4f059
23f40e3
14ac75a
1a8211e
11ea270
d3c19ad
9677e14
9f75ee6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think it is better to use
new File(baseDirectory, file);
or simular.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.
I disagree. Until now we have used the file handler everywhere. Making a file directly would require getting the full path to the plugin root, which is extra work
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.
you don't https://github.com/KevinDaGame/VoxelSniper-Reimagined/blob/master/VoxelSniperCore/src/main/java/com/github/kevindagame/util/Messages.java#L383C92-L383C92
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.
Also I am not sure if using '/' is platform dependent or not..
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.
That's more an issue on that part. I prefer to leave this file logic to the main file handler. It might be a good idea to refactor this in other places
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.
Maybe this would be a nice option, we could add/change a method in filehandler
File getDataFile(String... path)
, which could take all path 'parts', without having to concatenate the strings, which I think is not the way it is meant to be done in Java (could be wrong here, but most examples either use File or Paths).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.
INFO: Why don't you like the way I'm using it? I'd like to stay away from the File constructor wherever possible, to prevent divergence later on.
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.
I do think though that the way we access the filehandler isn't nice. Perhabs this could be solved using dependency injection
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.
I will approve the PR, since the same issue was already present before I think, but we should indeed look into improving this.
I feel like we should, if we want to be able to change the implementation, supply every part of the path to the filehandler separately, so that it can traverse the filesystem in whatever way it needs to.
This file was deleted.