Commit Graph

24 Commits

Author SHA1 Message Date
TheKodeToad
669eef92eb Make requested changes and utilise AssertionError
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-19 08:54:17 +00:00
TheKodeToad
32c2ad2bbd A lot more cleanup
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 17:51:18 +00:00
TheKodeToad
f2ca9a6b31 Revert switch to JUL for better colours
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 17:38:23 +00:00
TheKodeToad
1ea2e85415 Implicit is generally prefered
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
4a2df30f92 Try to use more standard exit codes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
922220c11e More consistent logging text
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
56d5035c63 Fix the warnings properly
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:27 +00:00
TheKodeToad
4abf3a20c6 More standard code formatting profile
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:25 +00:00
TheKodeToad
5912ef3b45 Just ignore empty lines
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
9931c9a286 Remove arguments being passed twice
Passing the classpath into stdin has no effect. Java is already provided the classpath with -cp, which pretty much takes up the largest part of the arguments anyway, which leads me to wonder, what's the point of stdin arguments at all?

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
1da834f650 *opinionated change* Remove LauncherFactory
Factories in OOP are a classic example of over-enginneering. When you only have two launchers I personally think that it's not very useful.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:37:00 +00:00
TheKodeToad
5b9bfe8891 Attempt to mimic clang-format
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:36:33 +00:00
TheKodeToad
8ce78dcc54 Try to improve consistency
- Makes code formatting more consistent with the C++ codebase. Probably removes some trailing whitespace. Maybe it would be best to commit an Eclipse or IntelliJ code format preferences file?
- Removes obscure suppressions. I personally think it's better to only suppress warnings that javac complains about. Suppressing a lot of non-standardised warnings (many of them turned off by default even in IntelliJ) just creates needless clutter.
- Fixes some trivial warnings instead of suppressing them. serialVersionUID is sort of stupid, but I'd rather mentally ignore it or just fix it if it's really that annoying.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:35:43 +00:00
solonovamax
afe088dba1 Fix license headers
- Update license headers in several files to remove multimc apache reference, when unneeded
  - LauncherFactory: we've entirely rewritten this class at this point, so it's fully under GPL code
  - Launcher: this interface contains zero logic, and only a single method named `launch`, so I doubt you can actually copyright that
  - LauncherProvider: same as above
  - ParseException, ParameterNotFoundException: same as above; this class contains almost no logic (And the logic that was added is under GPL)
  - ReflectionUtils, StringUtils: add license header
  - Everything else: modify the program name in the license header from "PolyMC - Minecraft Launcher" to "Prism Launcher"

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
e899e31745 More informative exceptions in entrypoint
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
ac5b74301e Cleanup splitting string into a pair
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
TheKodeToad
609b30110b Make main static
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>

Inline local variable

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
c0b8c53e69 Attempt to sort out copyright headers
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
TheKodeToad
e86fbc697f Fix formatting
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:25:09 +00:00
solonovamax
99d9868116 Cleanup EntryPoint code
- Don't return an int from listen(). An enum is preferred.
- Make parseLine() static, and pass Parameters to it.

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
107fa6b4f7 Code refactors
- Refactor LauncherFactory.LauncherProvider to LauncherFactory
- Refactor all launcher related components to launcher package
- some basic code cleanup
- Rename all, allSafe -> getList and first, firstSafe -> getString
- Rename Utils -> LegacyUtils

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
solonovamax
9062d28704 Get rid of singleton, and refactor LauncherFactory to be a static class
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2022-11-08 16:25:09 +00:00
TheKodeToad
e68dcea6bc Various tweaks to the Java component of the launcher
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-08 16:24:55 +00:00
Samisafool
8201d1df02
Rename
Signed-off-by: Samisafool <thenerdiestguy@gmail.com>
2022-10-19 15:02:43 +05:30