Skip to content

Commit

Permalink
misc: 调整“已是最新版”的相关消息
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Nov 2, 2023
1 parent a5d9f2e commit 76435db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package xiamomc.morph.commands.subcommands.plugin;

import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -53,6 +54,9 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull String[] args)
private void onRequestFinish(UpdateHandler.CheckResult result, CommandSender sender)
{
if (result == UpdateHandler.CheckResult.ALREADY_LATEST)
sender.sendMessage(MessageUtils.prefixes(sender, UpdateStrings.noNewVersionAvailable()));
{
var msg = UpdateStrings.noNewVersionAvailable().resolve("mc_version", Bukkit.getMinecraftVersion());
sender.sendMessage(MessageUtils.prefixes(sender, msg));
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/xiamomc/morph/updates/UpdateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private void onUpdateReqFinish(CloseableHttpResponse response, int reqId,

if (currentVersion.equals(latestVersion))
{
logger.info("Already on the latest version");
logger.info("Already on the latest version for " + Bukkit.getMinecraftVersion());

if (onFinish != null)
onFinish.accept(CheckResult.ALREADY_LATEST);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/feathermorph/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"update.msg_header_footer": "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-",
"update.checking_update": "Checking update...",
"update.new_version_available": "A newer version of FeatherMorph has been released!(<current> -> <origin>)",
"update.no_new_ver_available": "You're already on the latest version",
"update.no_new_ver_available": "You're already on the latest version for <mc_version>",
"update.update_here": "Update here: <url>",
"requests.already_have_disguise": "<color:red>You already have their disguise!",
"requests.cant_send_to_self": "<color:red>You can't send requests to yourself",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/feathermorph/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"update.msg_header_footer": "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-",
"update.checking_update": "检查更新中...",
"update.new_version_available": "FeatherMorph有新版本辣!(<current> -> <origin>)",
"update.no_new_ver_available": "FeatherMorph已是最新版本",
"update.no_new_ver_available": "FeatherMorph已是<mc_version>上的最新版本",
"update.update_here": "在此更新:<url>",
"requests.already_have_disguise": "<color:red>你已经有对方的形态了",
"requests.cant_send_to_self": "<color:red>你不能给自己发请求",
Expand Down

0 comments on commit 76435db

Please sign in to comment.