-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add version checker #15
base: ver/1.1.0
Are you sure you want to change the base?
Conversation
Adds a version checker as defined in #3
Don't ignore error messages from update checker
Update checking settings were moved out of the command blocker settings. With the migration code, cleaned up the code interfacing with Configurate.
reformatting code via IDE
initial code cleanup, unfortunately I forgot to reformat the code for v1.1.0 so it's also touching unrelated files :/
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.
Fantastic work - thanks as always!
I'll try sort out these remaining to-do's and then merge. 👍🏻
} | ||
|
||
if (isNewerVersion){ | ||
notifyMessage = "Your BlackWindow version is a pre-release. Latest release version is " + latestVersion + ". (You're running " + currentVersion + ")"; |
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'll switch these hard coded messages to the translations system already in BW
} | ||
|
||
// returns if successful or not | ||
public boolean checkLatestVersion( |
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'll convert this over to an exception system rather than booleans + error message variables - might be cleaner to handle errors, or otherwise easier to backtrace
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.
should be resolved in latest commit - will look over later to confirm nothing else to do on this
|
||
this.verStr = verStr; | ||
|
||
for (final String numTemp : verStr.split("\\.")) { |
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 need to define a formal version specification for BlackWidow and make sure we can parse it with this update checker.
Changed errorMessage variables to exceptions UpdateChecker is now static
I hadn't realized there were conflicts until I uploaded the newest commit. The conflict resolver is very confusing, hopefully I didn't accidently remove anything you added. |
Should be no worries, will iron any issues caused by this later |
Will put this on hold @stumper66 and work on it alongside whatever's next in line for this plugin. Might wait for some more use of the plugin before spending more time on it :) |
Implements #3