errorx.net

FxCustomTexture

Author: FxStudio

Develop a fully functional, optimized Minecraft Java plugin named FxCustomTexture.

  1. Plugin Information
  • Name: FxCustomTexture
  • Author: FxStudio
  • Version: 1.0.0
  • Minecraft: Java 1.21.11
  • Platform: Paper
  • Java: 21
  • Build system: Maven

The plugin must be a complete custom texture/icon creation and resource-pack generation system.

---

  1. Plugin Prefix

Use this prefix everywhere:

prefix: "&#FFB930&lCustomTexture &8» &r"

The prefix must be configurable in "config.yml".

Support:

  • Legacy colors ("&a", "&c", "&l", etc.)
  • HEX colors ("&#FFFFFF")
  • Reset codes ("&r")

---

  1. Folder Structure and Each File's Purpose

Create the following complete structure:

FxCustomTexture/ ├── src/main/java/ │ └── me/fxstudio/fxcustomtexture/ │ ├── FxCustomTexture.java │ ├── commands/ │ │ └── FCTCommand.java │ ├── gui/ │ │ └── TextureGUI.java │ ├── generator/ │ │ └── PackGenerator.java │ ├── texture/ │ │ ├── TextureManager.java │ │ └── TextureData.java │ ├── listeners/ │ │ └── GUIListener.java │ ├── utils/ │ │ ├── ColorUtils.java │ │ └── MessageUtils.java │ └── config/ │ └── ConfigManager.java │ ├── src/main/resources/ │ ├── plugin.yml │ ├── config.yml │ └── texture.yml │ ├── contents/ │ ├── heart.png │ ├── crown.png │ └── custom.png │ ├── output/ ├── pom.xml └── README.md

What each file does:

FxCustomTexture.java

  • Main plugin class.
  • Initializes the plugin.
  • Loads configurations.
  • Registers commands and listeners.
  • Initializes the texture manager and GUI.
  • Handles plugin startup and shutdown.

FCTCommand.java

  • Handles all "/fct" commands.
  • Checks permissions.
  • Handles command arguments.
  • Sends configurable messages.

TextureGUI.java

  • Creates and manages the texture GUI.
  • Displays available textures.
  • Handles pagination.
  • Displays texture information.

PackGenerator.java

  • Generates the resource pack.
  • Reads configured textures.
  • Creates required resource-pack files.
  • Creates the final ZIP file.
  • Applies texture positioning and scaling configuration where supported.

TextureManager.java

  • Loads textures from texture.yml.
  • Validates texture definitions.
  • Stores texture data.
  • Provides access to registered textures.
  • Handles texture lookup.

TextureData.java

  • Stores individual texture information.
  • Stores texture name, path, permission, texture code, scaling and positioning.

GUIListener.java

  • Handles GUI clicks.
  • Prevents unauthorized GUI actions.
  • Handles pagination buttons.
  • Handles texture selection.

ColorUtils.java

  • Processes legacy colors and HEX colors.

MessageUtils.java

  • Handles configurable messages.
  • Handles prefix formatting.
  • Handles placeholders where applicable.

ConfigManager.java

  • Loads configuration files.
  • Handles reloads.
  • Validates configuration values.

plugin.yml

  • Plugin metadata.
  • Commands.
  • Permissions.
  • Main class.

config.yml

  • Main settings.
  • Prefix.
  • Messages.
  • GUI settings.
  • ZIP generation settings.
  • Debug options.

texture.yml

  • Individual texture definitions.
  • Texture paths.
  • Permissions.
  • Codes.
  • Display settings.
  • Positioning and scaling.

contents/

  • Administrator's original PNG textures.
  • The plugin reads the PNG files from this folder.

output/

  • Stores generated resource-pack ZIP files.

pom.xml

  • Maven dependencies.
  • Java version.
  • Paper API.
  • Compilation settings.

README.md

  • Installation.
  • Configuration.
  • Commands.
  • Texture creation workflow.
  • Resource-pack usage.

---

  1. texture.yml

Example:

textures: heart: path: "contents/heart.png" use_code: ":heart:" permission: "" show_in_gui: true scale_ratio: 1.0 y_position: 0

crown: path: "contents/crown.png" use_code: ":crown:" permission: "fxcustomtexture.crown" show_in_gui: true scale_ratio: 1.0 y_position: 0

Explanation:

  • "heart": Internal texture ID.
  • "path": Location of the PNG file.
  • "use_code": Code used to identify the texture.
  • "permission": Permission required to use the texture.
  • "show_in_gui": Determines whether the texture is visible in the GUI.
  • "scale_ratio": Configurable texture scaling.
  • "y_position": Configurable vertical positioning.

Support unlimited texture definitions, subject to practical resource-pack limitations.

---

  1. Commands

Implement all commands properly.

Main command

"/fct"

Displays the plugin help menu.

Commands

  • "/fct" - Displays help.
  • "/fct help" - Displays all commands.
  • "/fct reload" - Reloads all plugin configurations.
  • "/fct zip" - Generates the resource-pack ZIP.
  • "/fct list" - Lists all registered textures.
  • "/fct info <texture>" - Displays information about a specific texture.
  • "/fct gui" - Opens the texture GUI.
  • "/fct give <player> <texture>" - Gives the configured custom texture item where the implementation supports item-based texture representation.
  • "/fct preview <texture>" - Displays available preview information about a texture.
  • "/fct create <name>" - Creates a template entry for a new texture in the configuration, without creating a fake PNG.
  • "/fct delete <name>" - Removes a texture configuration entry with confirmation or safe handling.
  • "/fct validate" - Checks texture definitions and files for errors.
  • "/fct version" - Displays plugin version.

Commands must have tab completion wherever practical.

All commands must have proper permission checks.

---

  1. Permissions

fxcustomtexture.admin fxcustomtexture.use fxcustomtexture.gui fxcustomtexture.zip fxcustomtexture.reload fxcustomtexture.list fxcustomtexture.info fxcustomtexture.give fxcustomtexture.create fxcustomtexture.delete fxcustomtexture.preview fxcustomtexture.validate

The admin permission may grant access to administrative commands.

Individual texture permissions must be configurable separately.

---

  1. config.yml

Create a complete configurable config.yml.

Example:

prefix: "&#FFB930&lCustomTexture &8» &r"

settings: debug: false

zip: output-folder: "output" zip-name: "FxCustomTexture-Pack.zip"

gui: enabled: true title: "&#FFB930Custom Textures" rows: 6 pagination: true

messages: no-permission: "%prefix%&cYou don't have permission." player-only: "%prefix%&cThis command can only be used by players." reload: "%prefix%&aConfiguration reloaded successfully." zip-start: "%prefix%&eGenerating resource pack..." zip-success: "%prefix%&aResource pack generated successfully!" zip-failed: "%prefix%&cResource pack generation failed." texture-not-found: "%prefix%&cTexture not found." texture-created: "%prefix%&aTexture configuration created." texture-deleted: "%prefix%&aTexture configuration deleted." invalid-usage: "%prefix%&cInvalid command usage." no-textures: "%prefix%&cNo textures registered." validation-success: "%prefix%&aValidation completed." validation-error: "%prefix%&cErrors found in texture configurations." gui-open: "%prefix%&aOpening texture GUI."

All messages must be configurable.

Use "%prefix%" correctly in message processing.

---

  1. Texture GUI

Create a clean, organized texture GUI.

Requirements:

  • Configurable GUI title.
  • Configurable number of rows.
  • Pagination.
  • Previous and next page buttons.
  • Display configured textures.
  • Respect texture permissions.
  • Display texture information where appropriate.
  • Prevent players from taking GUI control items.
  • Prevent unauthorized click actions.
  • Avoid crashes when the texture list is empty.
  • Handle large texture lists efficiently.

---

  1. "/fct zip" System

This is one of the most important features.

When the administrator runs:

"/fct zip"

The plugin must:

  1. Load all texture entries.
  2. Validate texture configurations.
  3. Verify PNG files exist.
  4. Verify PNG files are valid.
  5. Generate the appropriate resource-pack directory structure.
  6. Generate required metadata and model files for the targeted Minecraft version.
  7. Register all configured texture representations.
  8. Apply configured scaling and positioning where the target resource-pack format supports them.
  9. Generate a ZIP file.
  10. Save the final ZIP inside the configured output folder.
  11. Inform the administrator of success or failure.

The ZIP must contain actual generated resource-pack files.

Do not generate an empty ZIP or a ZIP containing only the original PNGs.

Do not falsely claim the ZIP is valid if generation fails.

---

  1. Intended Workflow

The intended workflow is:

Step 1

Place PNG textures inside:

plugins/FxCustomTexture/contents/

Step 2

Configure textures inside:

plugins/FxCustomTexture/texture.yml

Step 3

Run:

/fct reload

Step 4

Run:

/fct validate

This checks for missing files and invalid configurations.

Step 5

Run:

/fct zip

Step 6

The plugin generates a resource-pack ZIP inside:

plugins/FxCustomTexture/output/

Step 7

Use the generated ZIP as the resource pack and obtain the exact pack-related code/hash required by the intended server configuration.

Step 8

Use the appropriate generated texture codes and resource-pack setup in the server configuration.

The plugin must not pretend that a ZIP file automatically provides a hosting URL or SHA-1 hash without actually calculating or providing the required output.

---

  1. Texture Handling
  • Support PNG textures.
  • Handle missing files.
  • Handle invalid PNG files.
  • Handle duplicate texture IDs.
  • Handle invalid texture codes.
  • Avoid corrupt ZIP files.
  • Validate paths.
  • Avoid unsafe path traversal.
  • Handle reloads without duplicating registrations.
  • Support large texture collections within practical limits.

---

  1. Optimization and Reliability
  • Use Java 21.
  • Use Paper API for Minecraft 1.21.11.
  • Use Maven.
  • Keep code organized.
  • Avoid unnecessary dependencies.
  • Avoid unnecessary synchronous operations.
  • Perform ZIP generation without freezing the server where practical.
  • Validate configuration entries.
  • Handle exceptions properly.
  • Avoid memory leaks.
  • Avoid repeated disk reads where caching is appropriate.
  • Do not introduce unnecessary features.
  • Ensure commands and GUI are functional.

---

  1. Deliverables

Provide:

  1. Complete Java source code.
  2. plugin.yml.
  3. config.yml.
  4. texture.yml.
  5. pom.xml.
  6. README.md.
  7. Properly compiled JAR if the build environment permits.
  8. Installation instructions.
  9. Instructions explaining each file.
  10. Instructions explaining how to add PNG textures.
  11. Instructions explaining how to configure texture.yml.
  12. Instructions explaining "/fct validate".
  13. Instructions explaining "/fct zip".
  14. Instructions explaining how to use the generated resource pack.
  15. Troubleshooting instructions.

Do not provide incomplete code.

Do not leave commands unimplemented.

Do not create fake functionality.

Build and test the plugin wherever the available environment permits, and clearly report what was actually tested.

Kodari AI
KodariFri at 11:10 am 5
FxCustomTexture
A comprehensive Minecraft Paper plugin for creating custom texture resource packs. Features include a GUI-based texture management system with pagination, configurable texture definitions with permissions and scaling, resource pack ZIP generation with proper metadata files, and a full command suite for managing textures. Includes validation, reload, and preview capabilities for administrators.

I’ll build the plugin around bitmap font glyphs, with validation, an asynchronous pack generator, and a permission-aware GUI. Example PNG artwork requires Kodari Studio, which can be enabled in project settings under Generation, or for all projects at https://kodari.ai/settings?tab=features.

Built the plugin source, configuration, Maven project, and usage guide.

The generated packs use font glyphs, not item models: /fct give reports that limitation, and texture codes are not automatically replaced in chat. Add your own PNGs before validating or generating a pack.

No build or runtime tests were run, so a compiled JAR is not included.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
15 590
src/main/java/me/fxstudio/fxcustomtexture/FxCustomTexture.java
package me.fxstudio.fxcustomtexture;

import me.fxstudio.fxcustomtexture.commands.FCTCommand;
import me.fxstudio.fxcustomtexture.config.ConfigManager;
import me.fxstudio.fxcustomtexture.generator.PackGenerator;
import me.fxstudio.fxcustomtexture.gui.TextureGUI;
import me.fxstudio.fxcustomtexture.listeners.GUIListener;
import me.fxstudio.fxcustomtexture.texture.TextureManager;
import me.fxstudio.fxcustomtexture.utils.MessageUtils;
import org.bukkit.plugin.java.JavaPlugin;

public final class FxCustomTexture extends JavaPlugin {
    private ConfigManager configs;
    private TextureManager textures;
    private MessageUtils messages;
    private PackGenerator generator;
    private TextureGUI gui;

    @Override public void onEnable() {
        configs = new ConfigManager(this);
        configs.reload();
        messages = new MessageUtils(this);
        textures = new TextureManager(this);
        textures.reload();
        generator = new PackGenerator(this);
        gui = new TextureGUI(this);
        FCTCommand command = new FCTCommand(this);
        getCommand("fct").setExecutor(command);
        getCommand("fct").setTabCompleter(command);
        getServer().getPluginManager().registerEvents(new GUIListener(this), this);
        getDataFolder().toPath().resolve("contents").toFile().mkdirs();
        getDataFolder().toPath().resolve("output").toFile().mkdirs();
    }
    public ConfigManager configs() { return configs; }
    public TextureManager textures() { return textures; }
    public MessageUtils messages() { return messages; }
    public PackGenerator generator() { return generator; }
    public TextureGUI gui() { return gui; }
}