Галкин Платон

создай плагин для майнкрафт сервера paper 1.21.11,на команду /changecraft и /creatcraft,/changecraft на смену Крафта какому-то предмету с красивым gui меню,/createcraft на создание Крафта любому предмету,который ты положишь,с красивым gui меню,и команду /delcraft,чтоб убрать предмет из верстака.

Kodari AI
KodariOct 10 at 7:09 pm 2
CraftManagerGUI
A Paper 1.21.11 plugin providing three commands for custom crafting management. /createcraft opens a GUI where players place an item to create a new custom recipe for that item. /changecraft opens a GUI to modify existing custom recipes, allowing players to change the crafting pattern for any registered item. /delcraft removes a custom recipe from the crafting system. The plugin uses a beautiful inventory-based GUI framework with clickable buttons, item icons, and intuitive navigation. Players interact through chest-style menus with colored item displays, lore descriptions, and confirmation dialogs. Recipes are stored persistently in a data file and automatically applied to the crafting system. The GUI supports lazy initialization, automatic event handling, and centralized management for smooth player experience. Commands are permission-gated and provide clear feedback messages. The plugin integrates seamlessly with Paper's crafting system, allowing custom recipes to appear in the standard crafting table interface.

План:

  1. Добавить Gradle-конфигурацию и описание Paper-плагина с тремя командами и совместимостью с опечаткой /creatcraft.

  2. Создать менеджер пользовательских рецептов с сохранением в config.yml и регистрацией на верстаке.

  3. Добавить GUI редактора и список крафтов для изменения или удаления.

Создан Paper-плагин CustomCraft: /createcraft и /creatcraft открывают меню создания рецепта, /changecraft — выбор рецепта для изменения, /delcraft — выбор для удаления. Рецепты сохраняются после перезапуска; ингредиенты с именами и чарами поддерживаются. Команды доступны операторам через customcraft.manage.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 612
src/main/java/com/kodari/customcraft/CustomCraftPlugin.java
package com.kodari.customcraft;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class CustomCraftPlugin extends JavaPlugin {
    private CraftRecipeManager recipeManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        recipeManager = new CraftRecipeManager(this);
        recipeManager.load();

        CraftCommand commandExecutor = new CraftCommand(this);
        getCommand("createcraft").setExecutor(commandExecutor);
        getCommand("creatcraft").setExecutor(commandExecutor);
        getCommand("changecraft").setExecutor(commandExecutor);
        getCommand("delcraft").setExecutor(commandExecutor);
        Bukkit.getPluginManager().registerEvents(new CraftListener(this), this);
    }

    public CraftRecipeManager getRecipeManager() {
        return recipeManager;
    }

    public void openEditor(Player player, CraftRecipe recipe) {
        player.openInventory(new CraftEditorGUI(recipe).getInventory());
    }

    public void openRecipeList(Player player, boolean deleteMode, int page) {
        player.openInventory(new RecipeListGUI(recipeManager.getRecipes(), deleteMode, page).getInventory());
    }
}