Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

change method of comparison #9

Open
wants to merge 2 commits into
base: 1.12.2
Choose a base branch
from

Conversation

criscky
Copy link

@criscky criscky commented Jun 24, 2021

I notice that when you use CurseForge with a java version 51, it never triggers the message about a old java
What happens is that the version printed is 1.8.0_51, when you compare with 1.8.0_162, it will tell you the 51 is higher than 162
So i splited the version into a array, and converted the second value to integer in order to do a better check

as a note
it will crash the game if the format isnt correct, aka missing the "_"
it will crash the game if the format isnt correct, aka if the "version" isnt a number

those 2 can be prevented with some more modifications

as a note
it will crash the game if the format isnt correct, aka missing the "_"
it will crash the game if the format isnt correct, aka if the "version" isnt a number
@criscky
Copy link
Author

criscky commented Jun 24, 2021

it doesnt crash anymore because i made the checks

@Desoroxxx
Copy link

Could this be merged and published

@mczph
Copy link

mczph commented Feb 24, 2023

This pr is very useful to prevent users from using Curseforge's old java,let's merge it.
@Darkhax

@Desoroxxx
Copy link

@Darkhax

Krutoy242 added a commit to Krutoy242/Enigmatica2Expert-Extended that referenced this pull request May 30, 2023
Now, if player launch game from CurseForge launcher with 7-year-old Java, they will be warned.

Implement Darkhax-Minecraft/OldJavaWarning#9

https://i.imgur.com/OfIfrWz.png
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants