9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00

refactor(i18n): 修改命名

This commit is contained in:
jhqwqmc
2025-03-16 21:18:15 +08:00
parent 2dd2752262
commit 91c14bf31a
5 changed files with 6 additions and 8 deletions

View File

@@ -5,7 +5,6 @@ import net.momirealms.craftengine.bukkit.plugin.user.BukkitServerPlayer;
import net.momirealms.craftengine.core.item.recipe.Recipe;
import net.momirealms.craftengine.core.plugin.CraftEngine;
import net.momirealms.craftengine.core.plugin.command.CraftEngineCommandManager;
import net.momirealms.craftengine.core.plugin.command.FlagKeys;
import net.momirealms.craftengine.core.plugin.locale.MessageConstants;
import net.momirealms.craftengine.core.util.Key;
import org.bukkit.NamespacedKey;
@@ -53,7 +52,7 @@ public class ItemRecipeBrowserAdminCommand extends BukkitCommandFeature<CommandS
if (!inRecipes.isEmpty()) {
plugin().itemBrowserManager().openRecipePage(serverPlayer, null, inRecipes, 0, 0, false);
} else {
handleFeedback(context, MessageConstants.COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NO_FOUND);
handleFeedback(context, MessageConstants.COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NOT_FOUND);
}
}
});

View File

@@ -5,7 +5,6 @@ import net.momirealms.craftengine.bukkit.plugin.user.BukkitServerPlayer;
import net.momirealms.craftengine.core.item.recipe.Recipe;
import net.momirealms.craftengine.core.plugin.CraftEngine;
import net.momirealms.craftengine.core.plugin.command.CraftEngineCommandManager;
import net.momirealms.craftengine.core.plugin.command.FlagKeys;
import net.momirealms.craftengine.core.plugin.locale.MessageConstants;
import net.momirealms.craftengine.core.util.Key;
import org.bukkit.NamespacedKey;
@@ -48,7 +47,7 @@ public class ItemRecipeBrowserPlayerCommand extends BukkitCommandFeature<Command
if (!inRecipes.isEmpty()) {
plugin().itemBrowserManager().openRecipePage(serverPlayer, null, inRecipes, 0, 0, false);
} else {
handleFeedback(context, MessageConstants.COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NO_FOUND);
handleFeedback(context, MessageConstants.COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NOT_FOUND);
}
});
}

View File

@@ -52,7 +52,7 @@ public class ItemUsageBrowserAdminCommand extends BukkitCommandFeature<CommandSe
if (!inRecipes.isEmpty()) {
plugin().itemBrowserManager().openRecipePage(serverPlayer, null, inRecipes, 0, 0, false);
} else {
handleFeedback(context, MessageConstants.COMMAND_ITEM_USAGE_BROWSER_RECIPE_NO_FOUND);
handleFeedback(context, MessageConstants.COMMAND_ITEM_USAGE_BROWSER_RECIPE_NOT_FOUND);
}
}
});

View File

@@ -47,7 +47,7 @@ public class ItemUsageBrowserPlayerCommand extends BukkitCommandFeature<CommandS
if (!inRecipes.isEmpty()) {
plugin().itemBrowserManager().openRecipePage(serverPlayer, null, inRecipes, 0, 0, false);
} else {
handleFeedback(context, MessageConstants.COMMAND_ITEM_USAGE_BROWSER_RECIPE_NO_FOUND);
handleFeedback(context, MessageConstants.COMMAND_ITEM_USAGE_BROWSER_RECIPE_NOT_FOUND);
}
});
}

View File

@@ -16,6 +16,6 @@ public interface MessageConstants {
TranslatableComponent.Builder COMMAND_ITEM_GIVE_SUCCESS_SINGLE = Component.translatable().key("command.item.give.success.single");
TranslatableComponent.Builder COMMAND_ITEM_GIVE_SUCCESS_MULTIPLE = Component.translatable().key("command.item.give.success.multiple");
TranslatableComponent.Builder COMMAND_ITEM_GIVE_FAILURE_NOT_EXIST = Component.translatable().key("command.item.give.failure.not_exist");
TranslatableComponent.Builder COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NO_FOUND = Component.translatable().key("command.item.recipe.browser.recipe.no_found");
TranslatableComponent.Builder COMMAND_ITEM_USAGE_BROWSER_RECIPE_NO_FOUND = Component.translatable().key("command.item.usage.browser.recipe.no_found");
TranslatableComponent.Builder COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NOT_FOUND = Component.translatable().key("command.item.recipe.browser.recipe.no_found");
TranslatableComponent.Builder COMMAND_ITEM_USAGE_BROWSER_RECIPE_NOT_FOUND = Component.translatable().key("command.item.usage.browser.recipe.no_found");
}