diff --git a/MinecraftClient/Program.cs b/MinecraftClient/Program.cs index ad78111d..58a42b9b 100644 --- a/MinecraftClient/Program.cs +++ b/MinecraftClient/Program.cs @@ -318,6 +318,8 @@ namespace MinecraftClient ConsoleIO.WriteLine(string.Format(Translations.mcc_banner_classic, Version, MCLowestVersion, MCHighestVersion, "Github.com/MCCTeam")); if (BuildInfo is not null) ConsoleIO.WriteLineFormatted("§8" + BuildInfo); + if (Config.Main.Advanced.ShowGithubStarReminder) + ConsoleIO.WriteLineFormatted("§e" + Translations.mcc_banner_star_reminder); } private static void MaybePrintClassicModeTuiRecommendation() diff --git a/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs b/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs index 36687b26..ee4b68ed 100644 --- a/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs +++ b/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs @@ -1877,6 +1877,15 @@ namespace MinecraftClient { } } + /// + /// Looks up a localized string similar to Show a GitHub star reminder on startup. Set to false to hide it.. + /// + internal static string Main_Advanced_show_github_star_reminder { + get { + return ResourceManager.GetString("Main.Advanced.show_github_star_reminder", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show full effect names and levels in the TUI status bar instead of compact effect icons only.. /// diff --git a/MinecraftClient/Resources/ConfigComments/ConfigComments.resx b/MinecraftClient/Resources/ConfigComments/ConfigComments.resx index a5e5e407..22028071 100644 --- a/MinecraftClient/Resources/ConfigComments/ConfigComments.resx +++ b/MinecraftClient/Resources/ConfigComments/ConfigComments.resx @@ -738,6 +738,9 @@ Usage examples: "/tell <mybot> connect Server1", "/connect Server2" Show full effect names and levels in the TUI status bar instead of compact effect icons only. + + Show a GitHub star reminder on startup. Set to false to hide it. + System messages for server ops. diff --git a/MinecraftClient/Resources/Translations/Translations.Designer.cs b/MinecraftClient/Resources/Translations/Translations.Designer.cs index dd7c0d85..4eb1a044 100644 --- a/MinecraftClient/Resources/Translations/Translations.Designer.cs +++ b/MinecraftClient/Resources/Translations/Translations.Designer.cs @@ -2311,6 +2311,12 @@ namespace MinecraftClient { } } + internal static string mcc_banner_star_reminder { + get { + return ResourceManager.GetString("mcc.banner.star_reminder", resourceCulture); + } + } + internal static string mcc_banner_label_mc_versions { get { return ResourceManager.GetString("mcc.banner.label_mc_versions", resourceCulture); diff --git a/MinecraftClient/Resources/Translations/Translations.resx b/MinecraftClient/Resources/Translations/Translations.resx index 4807cc65..779572d9 100644 --- a/MinecraftClient/Resources/Translations/Translations.resx +++ b/MinecraftClient/Resources/Translations/Translations.resx @@ -845,6 +845,9 @@ Add the ID of this chat to "Authorized_Chat_Ids" field in the configuration file Minecraft Console Client v{0} - for MC {1} to {2} - {3} + + ⭐ Like MCC? Star us on GitHub: https://github.com/MCCTeam/Minecraft-Console-Client + Supported MC Versions: diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index ffdea953..4a9b9c6c 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -820,6 +820,9 @@ namespace MinecraftClient [TomlInlineComment("$Main.Advanced.show_effect_names_in_tui$")] public bool ShowEffectNamesInTUI = false; + [TomlInlineComment("$Main.Advanced.show_github_star_reminder$")] + public bool ShowGithubStarReminder = true; + [TomlInlineComment("$Main.Advanced.terrain_and_movements$")] public bool TerrainAndMovements = false; diff --git a/MinecraftClient/Tui/MccBannerPanelBuilder.cs b/MinecraftClient/Tui/MccBannerPanelBuilder.cs index 36d35b40..db1bc0b1 100644 --- a/MinecraftClient/Tui/MccBannerPanelBuilder.cs +++ b/MinecraftClient/Tui/MccBannerPanelBuilder.cs @@ -28,6 +28,9 @@ namespace MinecraftClient.Tui AddVersionRange(infoPanel); AddGithub(infoPanel); + if (Settings.Config.Main.Advanced.ShowGithubStarReminder) + AddStarReminder(infoPanel); + if (buildInfo is not null) AddBuildInfo(infoPanel, buildInfo); @@ -70,6 +73,14 @@ namespace MinecraftClient.Tui panel.Children.Add(row); } + private static void AddStarReminder(StackPanel panel) + { + var row = new TextBlock(); + row.Inlines!.Add(new Run("\u2b50 ") { Foreground = Pal.Gold }); + row.Inlines.Add(Val("Star us on GitHub!", Pal.Gold)); + panel.Children.Add(row); + } + private static void AddBuildInfo(StackPanel panel, string buildInfo) { panel.Children.Add(new TextBlock