hiding title screen branding if others were removed

This commit is contained in:
CCr4ft3r
2023-04-13 17:43:57 +02:00
parent 709d45fd5e
commit 976708d517
2 changed files with 6 additions and 4 deletions
@@ -40,9 +40,11 @@ public class TitleScreenInjector {
computeBranding.invoke(null);
List<String> brandings = new ArrayList<>((List<String>) f.get(brandingControl));
List<String> newBrandings = new ArrayList<>(brandings);
f.set(brandingControl, newBrandings);
newBrandings.add("Lightspeed: Launch took " + secondsToStart + "s");
if (brandings.size() > 1) {
List<String> newBrandings = new ArrayList<>(brandings);
f.set(brandingControl, newBrandings);
newBrandings.add("Lightspeed: Launch took " + secondsToStart + "s");
}
} catch (NoSuchFieldException | NoSuchMethodException | IllegalAccessException |
InvocationTargetException e) {
LogUtils.getLogger().error("Cannot add launch time to title screen", e);