9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 11:59:11 +00:00

feat(core): 添加查看物品配方和用法功能

This commit is contained in:
jhqwqmc
2025-03-16 18:58:54 +08:00
parent 20d0326828
commit 7f77bf16ff
6 changed files with 7 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ 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.locale.MessageConstants;
import net.momirealms.craftengine.core.util.Key;
import org.bukkit.NamespacedKey;
import org.bukkit.command.CommandSender;
@@ -46,7 +47,7 @@ public class ItemRecipeBrowserCommand extends BukkitCommandFeature<CommandSender
if (!inRecipes.isEmpty()) {
plugin().itemBrowserManager().openRecipePage(serverPlayer, null, inRecipes, 0, 0);
} else {
plugin().itemBrowserManager().openNoRecipePage(serverPlayer, itemId, null, 0);
handleFeedback(context, MessageConstants.COMMAND_ITEM_RECIPE_BROWSER_RECIPE_NO_FOUND);
}
});
}