From f7288bd13e5c84e51ecab8a5891f664ba17ab447 Mon Sep 17 00:00:00 2001 From: mcchampions <1309635304@qq.com> Date: Tue, 30 Jul 2024 12:39:30 +0800 Subject: [PATCH] Update --- .../thebusybiscuit/slimefun4/api/researches/Research.java | 2 +- .../slimefun4/core/commands/SlimefunTabCompleter.java | 2 +- .../slimefun4/core/commands/subcommands/ResearchCommand.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java index 0b0d4f5335..cc8d385501 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java @@ -149,7 +149,7 @@ public String getName() { * @return The unlocalized, decolorized name for this {@link Research} */ public String getUnlocalizedName() { - return TextUtils.toPlainText(TextUtils.fromText(name)); + return name; } /** diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/SlimefunTabCompleter.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/SlimefunTabCompleter.java index a35d21bcff..cf812c3225 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/SlimefunTabCompleter.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/SlimefunTabCompleter.java @@ -53,7 +53,7 @@ public List onTabComplete(CommandSender sender, Command cmd, String labe suggestions.add("reset"); for (Research research : researches) { - suggestions.add(research.getUnlocalizedName()); + suggestions.add(research.getName()); } return createReturnList(suggestions, args[2]); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/ResearchCommand.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/ResearchCommand.java index 780a39e5cf..8afe1004ac 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/ResearchCommand.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/ResearchCommand.java @@ -116,7 +116,7 @@ private Optional getResearchFromString(String input) { } for (Research research : Slimefun.getRegistry().getResearches()) { - if (research.getUnlocalizedName().equals(input)) { + if (research.getName().equals(input)) { return Optional.of(research); } }