diff --git a/src/main/java/xyz/ineanto/nicko/Nicko.java b/src/main/java/xyz/ineanto/nicko/Nicko.java
index 6899229..8b96749 100644
--- a/src/main/java/xyz/ineanto/nicko/Nicko.java
+++ b/src/main/java/xyz/ineanto/nicko/Nicko.java
@@ -47,9 +47,9 @@ public class Nicko extends JavaPlugin {
dataStore = new PlayerDataStore(mojangAPI, getNickoConfig());
- if (!MinecraftVersion.TRAILS_AND_TAILS.atOrAbove()) {
+ if (!MinecraftVersion.v1_21_5.atOrAbove()) {
getLogger().severe("This version (" + MinecraftVersion.getCurrentVersion().getVersion() + ") is not supported by Nicko!");
- getLogger().severe("As of version 1.2.0, Nicko only supports the latest Minecraft version. (Currently 1.21.4)");
+ getLogger().severe("As of version 1.2.0, Nicko only supports the latest Minecraft version. (Currently 1.21.5)");
dataStore.getStorage().setError(true);
Bukkit.getPluginManager().disablePlugin(this);
}
diff --git a/src/main/java/xyz/ineanto/nicko/gui/prompt/conversation/ConversationPrompt.java b/src/main/java/xyz/ineanto/nicko/gui/prompt/conversation/ConversationPrompt.java
index 7fe5848..7106225 100644
--- a/src/main/java/xyz/ineanto/nicko/gui/prompt/conversation/ConversationPrompt.java
+++ b/src/main/java/xyz/ineanto/nicko/gui/prompt/conversation/ConversationPrompt.java
@@ -8,14 +8,20 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import xyz.ineanto.nicko.Nicko;
import xyz.ineanto.nicko.gui.prompt.Prompt;
+import xyz.ineanto.nicko.language.LanguageKey;
import java.util.Map;
import java.util.Objects;
public class ConversationPrompt extends Prompt {
- private final ConversationFactory conversationFactory = new ConversationFactory(Nicko.getInstance());
private final String changeBothTag = "changeBoth";
private final Player player;
+ private final ConversationFactory conversationFactory = new ConversationFactory(Nicko.getInstance())
+ .withTimeout(30)
+ .withModality(false)
+ .withEscapeSequence("EXIT")
+ .withLocalEcho(false)
+ .thatExcludesNonPlayersWithMessage("Player only");
private String name;
@@ -24,17 +30,11 @@ public class ConversationPrompt extends Prompt {
this.player = player;
}
-
@Override
public void displayNameThenSkinPrompt() {
conversationFactory
- .thatExcludesNonPlayersWithMessage("Player only")
- .withTimeout(30)
- .withModality(false)
.withFirstPrompt(new ChangeNameConversation())
- .withEscapeSequence("EXIT")
.withInitialSessionData(Map.of(changeBothTag, true))
- .withLocalEcho(false)
.buildConversation(player)
.begin();
}
@@ -42,12 +42,7 @@ public class ConversationPrompt extends Prompt {
@Override
public void displaySkinPrompt() {
conversationFactory
- .thatExcludesNonPlayersWithMessage("Player only")
- .withModality(false)
- .withTimeout(30)
.withFirstPrompt(new ChangeSkinConversation())
- .withEscapeSequence("EXIT")
- .withLocalEcho(false)
.buildConversation(player)
.begin();
}
@@ -55,12 +50,7 @@ public class ConversationPrompt extends Prompt {
@Override
public void displayNamePrompt() {
conversationFactory
- .thatExcludesNonPlayersWithMessage("Player only")
- .withModality(false)
- .withTimeout(30)
.withFirstPrompt(new ChangeNameConversation())
- .withEscapeSequence("EXIT")
- .withLocalEcho(false)
.buildConversation(player)
.begin();
}
@@ -68,7 +58,7 @@ public class ConversationPrompt extends Prompt {
private class ChangeNameConversation extends StringPrompt {
@Override
public @NotNull String getPromptText(@NotNull ConversationContext context) {
- return "Enter your new name";
+ return playerLanguage.translate(LanguageKey.Event.Appearance.Set.CHAT_PROMPT_NAME, true);
}
@Override
@@ -86,7 +76,7 @@ public class ConversationPrompt extends Prompt {
private class ChangeSkinConversation extends StringPrompt {
@Override
public @NotNull String getPromptText(@NotNull ConversationContext context) {
- return "Enter your new skin";
+ return playerLanguage.translate(LanguageKey.Event.Appearance.Set.CHAT_PROMPT_SKIN, true);
}
@Override
diff --git a/src/main/java/xyz/ineanto/nicko/language/LanguageKey.java b/src/main/java/xyz/ineanto/nicko/language/LanguageKey.java
index 713d253..d8f9ef5 100644
--- a/src/main/java/xyz/ineanto/nicko/language/LanguageKey.java
+++ b/src/main/java/xyz/ineanto/nicko/language/LanguageKey.java
@@ -49,7 +49,8 @@ public class LanguageKey {
public static final String OK = SET_KEY + "ok";
public static final String ERROR = SET_KEY + "error";
- public static final String CHAT_PROMPT = SET_KEY + "chat_prompt";
+ public static final String CHAT_PROMPT_NAME = SET_KEY + "chat_prompt_name";
+ public static final String CHAT_PROMPT_SKIN = SET_KEY + "chat_prompt_skin";
}
public static class Remove {
diff --git a/src/main/resources/en.yml b/src/main/resources/en.yml
index 3b78607..ca18fb9 100644
--- a/src/main/resources/en.yml
+++ b/src/main/resources/en.yml
@@ -20,7 +20,8 @@ event:
set:
error: "Wasn''t able to apply your disguise! ({0})"
ok: "You''re now disguised."
- chat_prompt: "Please enter your new {0} in chat."
+ chat_prompt_name: "Please enter your new name in chat (type \"EXIT\" to cancel)."
+ chat_prompt_skin: "Please enter your new skin in chat (type \"EXIT\" to cancel)."
restore:
error: "Wasn''t able to apply the previous disguise! ({0})"
ok: "Previous disguise restored."
diff --git a/src/main/resources/fr.yml b/src/main/resources/fr.yml
index 68df92e..a2e7472 100644
--- a/src/main/resources/fr.yml
+++ b/src/main/resources/fr.yml
@@ -20,6 +20,8 @@ event:
set:
error: "Impossible d''appliquer votre déguisement ! ({0})"
ok: "Déguisement appliqué avec succès."
+ chat_prompt_name: "Veuillez entrer votre nouveau pseudo (saisissez \"EXIT\" pour arrêter)."
+ chat_prompt_skin: "Veuillez entrer votre nouveau skin (saisissez \"EXIT\" pour arrêter)."
restore:
error: "Impossible d''appliquer le précédent déguisement ! ({0})"
ok: "Votre précédent déguisement a été appliqué."