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:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user