Aaban Ch (Finex)
πŸ“Ž 1 file 32,734 chars
πŸ“„
pasted-code-1792514200893.txt
txt 852 lines
β–Ά
# MASTER DEVELOPMENT PROMPT β€” NOVAUI
## A Professional, Next-Generation Minecraft UI Framework & Visual Editor

Act as a senior Minecraft plugin engineer, Java architect, frontend engineer, UI/UX designer, animation engineer, and QA specialist. Build a complete, production-quality Minecraft UI framework named **NovaUI**.

This is a serious software development project, not a demonstration, mockup, or simple inventory GUI plugin.

The goal is to create an original, feature-rich alternative to Ultimate UI that combines a responsive custom cursor, animated HUDs, screen overlays, interactive interfaces, a drag-and-drop visual editor, resource-pack management, developer APIs, and powerful configuration tools.

Reference product for understanding the general product category:
https://builtbybit.com/resources/ultimate-ui.105345/

Use this reference only to understand the product category and publicly described capabilities. Do not copy proprietary source code, assets, branding, or distinctive designs. Create an original implementation with its own identity, architecture, and visual style.

## 1. PRIMARY OBJECTIVE

Build a complete ecosystem consisting of:

1. NovaUI Core β€” the Minecraft plugin and runtime engine.
2. NovaUI Studio β€” a professional visual UI editor.
3. NovaUI Renderer β€” the in-game interface rendering system.
4. NovaUI Input Engine β€” cursor, interaction, focus, and navigation.
5. NovaUI Animation Engine β€” smooth transitions and timeline-based animations.
6. NovaUI Resource Pack Engine β€” custom fonts, textures, glyphs, icons, and pack generation.
7. NovaUI Developer API β€” Java API and optional integrations.
8. NovaUI Configuration System β€” simple, validated, human-readable project files.
9. NovaUI Documentation and Examples β€” complete installation, development, and troubleshooting guides.

All components must work together as one coherent product.

Do not implement only the visual editor while leaving the actual Minecraft renderer unfinished. Do not implement a cursor that is merely decorative. Do not generate fake controls or simulated features that are presented as working functionality.

## 2. TECHNICAL STACK AND COMPATIBILITY

Use the following defaults unless repository inspection or verified compatibility requirements justify a change.

- Language: Java.
- Java version: Java 21 for the initial Minecraft 1.21.x target.
- Server API: Paper API.
- Build system: Gradle with a Gradle wrapper.
- Frontend: TypeScript, React, and Vite for NovaUI Studio.
- Editor styling: a maintainable component-based styling system with a consistent design token architecture.
- Data format: versioned JSON for UI projects and definitions; YAML for server configuration where appropriate.
- Testing: JUnit 5 and suitable frontend testing tools.
- Logging: structured, useful server logs with clear diagnostic information.
- Dependency management: use maintained, compatible libraries and avoid unnecessary dependencies.

Target Minecraft Java Edition 1.21.x initially, with the exact supported minor versions explicitly documented and tested. Prefer a stable, maintainable Paper implementation first.

Folia support must only be advertised after implementing and testing appropriate region-thread-safe scheduling. Never assume that ordinary Bukkit scheduler calls are automatically Folia-compatible.

Optional support for Purpur, compatible proxy environments, and other server implementations may be added through isolated compatibility modules.

Before implementation:

1. Inspect the current repository, existing files, installed toolchain, and build environment.
2. Determine what Kodari.ai can execute, build, test, and persist in this workspace.
3. Verify current Paper API requirements and available Minecraft rendering/input mechanisms.
4. Produce a concise architecture and implementation plan.
5. Then begin implementation instead of stopping after writing a plan.

If the workspace already contains code, preserve useful existing work and avoid destructive rewrites.

## 3. CRITICAL RENDERING AND INPUT FEASIBILITY

This section has the highest technical priority.

Minecraft's ordinary server API does not expose arbitrary desktop mouse coordinates as a general-purpose input API. Do not assume a server can freely draw arbitrary screen pixels or read every mouse movement.

Before selecting an implementation, investigate and document the exact rendering and input capabilities available for the supported client versions.

Evaluate feasible approaches such as:

- Resource-pack custom font glyphs and bitmap textures.
- Custom font providers and carefully managed glyph allocation.
- Action bar, boss bar, scoreboard, title, and other native presentation channels.
- Display entities or other world-space rendering primitives where appropriate.
- Inventory-slot interaction as a fallback input mechanism.
- Verified packet-level techniques where necessary and legally/technically appropriate.
- Optional client-side modifications only as a separately documented extension, never as an undeclared mandatory dependency.

Choose the most reliable combination of mechanisms that provides the desired experience.

Requirements:

- Clearly distinguish native vanilla-client functionality from optional client modifications.
- Do not claim that a server-only plugin can perform arbitrary mouse tracking unless the chosen mechanism genuinely enables it.
- If arbitrary cursor tracking requires a client modification or a restricted input technique, explain that limitation and provide the best viable fallback.
- Never pretend a resource pack alone provides functionality it cannot provide.
- Do not introduce ProtocolLib, PacketEvents, or NMS dependencies without proving that they are needed and compatible.
- If a packet-level approach is necessary, isolate it behind an input adapter and avoid scattering version-specific code throughout the plugin.
- Use supported public APIs whenever possible.

The architecture must allow future input implementations without rewriting the entire rendering engine.

## 4. NOVAUI STUDIO β€” PROFESSIONAL VISUAL EDITOR

Build a fully functional visual editor with a polished desktop-first interface.

### Main layout

The editor should contain:

- A top toolbar with project controls, undo/redo, preview, validation, save, and publish.
- A left sidebar containing a searchable component library and a layer hierarchy.
- A central canvas showing the UI being designed.
- A right sidebar with contextual properties for the selected element.
- A bottom or collapsible panel for animation timelines, validation messages, and project diagnostics.

Use a modern dark interface with restrained accent colors, clear typography, subtle borders, clean spacing, and useful empty states.

Avoid excessive glow effects, visual clutter, oversized gradients, and unnecessary animations in the editor itself.

### Canvas

Implement a real design canvas with:

- Drag-and-drop element placement.
- Element selection and deselection.
- Move, resize, alignment, and positioning controls.
- Selection outlines and resize handles.
- Grid and optional snap-to-grid.
- Rulers and alignment guides.
- Zoom and pan.
- Multi-select and group operations where feasible.
- Layer ordering.
- Duplicate, delete, copy, and paste.
- Keyboard shortcuts.
- Undo and redo with reliable history.
- A configurable preview viewport.
- Canvas guides and safe-area boundaries.
- Element locking and visibility toggles.
- A minimap or navigator for larger designs if practical.

Dragging and resizing must update the actual project model. The canvas must not be a static screenshot or a collection of decorative buttons.

### Coordinate system

Create a consistent, documented coordinate system.

Support:

- Absolute positioning.
- Relative positioning.
- Anchoring to edges or center.
- Parent-relative positioning.
- Normalized positions where appropriate.
- Responsive scaling and layout constraints.
- Explicit width and height.
- Minimum and maximum dimensions.
- Layer ordering and clipping rules where supported.

Define how the editor's design coordinates map to the actual Minecraft rendering coordinate system. Include scale, aspect ratio, safe-area, font metrics, and rounding considerations.

### Component library

Provide reusable components including:

- Text labels.
- Rich text labels where supported.
- Images and icons.
- Panels and containers.
- Buttons.
- Progress bars.
- Health, mana, energy, and experience indicators.
- Status indicators.
- Item icons.
- Tooltips.
- Notification cards.
- Badges.
- Separators.
- Background textures.
- Animated sprites.
- Lists and repeated components.
- Scrollable containers where the rendering mechanism supports them.
- Interactive tabs and toggles where supported.
- Custom components through an extension interface.

Every component should have appropriate configurable properties, rendering behavior, validation, and documentation.

Clearly identify components that require additional rendering support rather than pretending every web-style component works identically inside Minecraft.

### Property inspector

Provide contextual property panels.

For the selected component, expose relevant settings such as:

- Position and dimensions.
- Anchor and alignment.
- Visibility and opacity.
- Text and font configuration.
- Colors and texture references.
- Padding and spacing.
- Border and background.
- Scale and rotation where supported.
- Animation assignment.
- Hover, click, and focus behavior.
- Data bindings.
- Conditional visibility.
- Layer ordering.
- Responsive rules.
- Custom metadata.

Property changes must update the canvas immediately and be reflected in saved project data.

### Project management

Implement:

- Create, open, save, duplicate, rename, and delete projects.
- Autosave with debouncing.
- Explicit save status.
- Dirty-state detection.
- Project import and export.
- Reusable templates.
- Versioned project schemas.
- Migration handling for older project versions.
- Validation before publishing.
- Error messages with the affected element's name or ID.

Prevent data loss. Failed saves must be reported, not silently ignored.

## 5. CURSOR AND INPUT ENGINE

Implement the best reliable custom cursor experience supported by the chosen client architecture.

### Cursor features

- Custom cursor appearance and texture.
- Configurable cursor size and hotspot.
- Different appearances for default, hover, pressed, disabled, and dragging states.
- Smooth movement where actual input data is available.
- Configurable movement interpolation.
- Optional prediction or smoothing for delayed input, with safeguards against overshoot.
- Optional snapping to nearby interactive elements.
- Hover detection.
- Click feedback.
- Tooltip triggers.
- Focus and selection indicators.
- Configurable interaction sound effects.
- Keyboard navigation fallback.
- Input sensitivity settings where applicable.
- Cursor visibility control.
- Proper cleanup when the player disconnects or the interface closes.

### Input quality

Avoid a cursor that jitters, teleports, oscillates, or lags behind the player's input.

Use timestamps, interpolation, and bounded prediction only when the required input measurements are genuinely available.

Do not repeatedly spawn and destroy expensive entities on every movement update if a stable update mechanism can be used.

Support configurable update intervals and movement thresholds.

When network latency makes exact tracking impossible, prioritize stable, predictable movement over aggressive prediction.

### Interaction rules

Implement a proper interaction manager that can:

- Determine the topmost eligible interactive element.
- Resolve overlapping hitboxes.
- Support hover-enter and hover-exit events.
- Handle clicks and release events when the input mechanism exposes them.
- Prevent duplicate click events.
- Respect disabled and invisible elements.
- Apply event cancellation and propagation rules.
- Manage focus and navigation.
- Prevent stale interactions after an interface closes.
- Enforce permissions for sensitive actions.

Do not fire a click merely because a cursor visually overlaps an element if the actual input mechanism does not confirm an interaction.

## 6. RENDERING ENGINE AND UI LIFECYCLE

Build a rendering engine that translates project definitions into real in-game presentation.

Separate the renderer from the project editor and input implementation.

Responsibilities:

- Load and validate project definitions.
- Build runtime UI trees.
- Resolve component properties and assets.
- Calculate positions and sizes.
- Manage text, images, and textures.
- Apply supported animation states.
- Update dynamic data.
- Manage visibility and layering.
- Render only the changes that require updating where practical.
- Handle player-specific UI state.
- Clean up resources on close, quit, reload, and errors.

Use a retained UI model where suitable, with deterministic layout and explicit lifecycle management.

Support multiple UI instances for different players without allowing their state, cursor position, animation state, or data bindings to leak between players.

Avoid unnecessary entity creation, repeated full-tree rebuilds, excessive packet transmission, and per-player tasks that run continuously without purpose.

The renderer must support a clean shutdown and reload without orphaned entities or stale scheduled tasks.

## 7. HUD AND OVERLAY SYSTEM

Provide a comprehensive HUD engine.

Support persistent and temporary elements such as:

- Health and custom health displays.
- Mana, energy, stamina, and experience bars.
- Currency and statistics.
- Player names and ranks.
- Server announcements.
- Quest objectives.
- Cooldowns.
- Timers.
- Status effects.
- Custom text and images.
- Boss-style progress indicators.
- Action notifications.
- Contextual prompts.
- Custom server branding.
- Event-based overlays.
- Temporary warning and success messages.

### HUD behavior

Allow developers and administrators to define:

- Default HUD layouts.
- Per-player HUDs.
- Permission-based visibility.
- World-specific and region-specific rules where supported.
- Priority and layering.
- Show/hide conditions.
- Update intervals.
- Placeholder and data bindings.
- Animation on show and hide.
- Duration and expiration.
- Automatic cleanup.

Provide a sensible priority system when several HUDs compete for the same native Minecraft display channel.

Do not silently overwrite vanilla HUD elements or other plugins' UI. Document channel conflicts and offer configurable coexistence behavior.

## 8. ANIMATION AND VISUAL EFFECTS ENGINE

Build a reusable animation system rather than hardcoding individual effects.

### Animation types

Where supported by the renderer, include:

- Fade in and fade out.
- Slide from any direction.
- Scale in and out.
- Smooth position transitions.
- Rotation.
- Color transitions.
- Progress-bar animation.
- Sprite and frame animation.
- Bounce.
- Pulse.
- Shake.
- Blur or glow only when technically supported by the rendering mechanism.
- Particle-based effects where appropriate.
- Sequential animations.
- Parallel animations.
- Delays and loops.
- Reversible animations.
- Animation chaining.

### Timeline editor

Include:

- Keyframes.
- Timeline scrubbing.
- Adjustable duration.
- Delay and repeat settings.
- Easing selection.
- Start and end values.
- Preview controls.
- Animation presets.
- Reusable named animations.
- Element-level animation assignment.

Implement common easing functions such as linear, ease-in, ease-out, ease-in-out, and cubic BΓ©zier where appropriate.

Use time-based animation progression rather than assuming every server tick corresponds to a fixed real-world duration.

Animation previews should work inside the editor, and published animations must use the same underlying definitions.

Do not advertise GPU shaders, arbitrary blur, or native pixel-level effects unless the selected client rendering mechanism genuinely supports them.

## 9. RESOURCE PACK ENGINE

Build a resource-pack subsystem that is reliable and straightforward to use.

Features:

- Generate a compatible pack from registered UI assets.
- Support custom fonts and bitmap glyphs.
- Support UI icons and textures.
- Validate asset dimensions and file types.
- Allocate custom glyph identifiers safely.
- Prevent collisions with other NovaUI assets.
- Support reusable asset libraries.
- Generate the appropriate Minecraft resource-pack metadata.
- Validate pack structure before export.
- Provide a downloadable ZIP.
- Provide clear installation and distribution instructions.
- Allow integration with a configured external resource-pack hosting workflow.
- Report missing or invalid assets.
- Support a resource-pack versioning strategy.

Never overwrite another plugin's font definitions or assume that glyph identifiers are globally available.

Design optional integration adapters for ItemsAdder, Oraxen, and Nexo, but only implement integrations against their verified APIs and supported versions.

If an integration is unavailable, provide a clear optional-dependency message and keep NovaUI functional without it.

Resource-pack merging must preserve existing assets and must never silently replace another plugin's pack.

If a pack is required for a feature, communicate that requirement clearly to the administrator and player.

## 10. DATA BINDING AND DYNAMIC CONTENT

Allow UI elements to display live data.

Provide a secure, extensible binding system for values such as:

- Player name.
- Player health.
- Experience.
- Currency through a supported economy integration.
- Permission-dependent text.
- Server-defined variables.
- PlaceholderAPI values through an optional adapter.
- Values exposed by other plugins through NovaUI's developer API.
- Custom values supplied by an application or event handler.

Use typed binding definitions where possible.

Support formatting, fallbacks, update intervals, and conditional visibility.

Prevent uncontrolled polling and repeated expensive placeholder evaluations.

Cache safe, reusable results where appropriate and invalidate them when the underlying value changes.

Never execute arbitrary Java code, shell commands, or untrusted expressions from a UI project.

## 11. EVENTS, ACTIONS, AND INTERACTIVITY

Allow interactive elements to trigger defined actions.

Provide a whitelist-based action system for operations such as:

- Open another UI.
- Close a UI.
- Update a component value.
- Display a notification.
- Play a sound.
- Execute a permitted server-side action.
- Dispatch a configured command.
- Trigger a registered Java callback.
- Change a state variable.
- Start or stop an animation.
- Show or hide an element.
- Trigger a custom developer-defined event.

Support interaction events such as:

- On open.
- On close.
- On hover.
- On click.
- On value change.
- On animation completion.
- On data update.

Validate permissions, command execution, player context, and user-provided input.

Never allow imported UI projects to execute arbitrary code.

## 12. NOVAUI DEVELOPER API

Create a documented, stable Java API.

Provide interfaces or equivalent abstractions for:

- Loading a UI definition.
- Opening a UI for a player.
- Closing an active UI.
- Updating component properties.
- Setting data bindings.
- Registering custom components.
- Registering custom actions.
- Registering custom data providers.
- Listening to UI lifecycle events.
- Registering animation definitions.
- Managing player-specific state.
- Querying active UI instances.
- Registering resource-pack integrations.

Design the API around public interfaces rather than implementation classes.

Provide example integrations and a separate example plugin demonstrating real usage.

Create Skript integration only if a maintained, compatible integration is feasible. Keep it optional.

Publish Javadocs or equivalent API documentation and include example source code.

## 13. COMMANDS AND PERMISSIONS

Create a consistent command system using the primary command `/novaui`.

Suggested commands:

- `/novaui help`
- `/novaui reload`
- `/novaui editor`
- `/novaui open  `
- `/novaui close `
- `/novaui list`
- `/novaui validate `
- `/novaui pack build`
- `/novaui pack status`
- `/novaui debug`
- `/novaui version`

Adapt syntax as needed to fit the final architecture.

Requirements:

- Tab completion.
- Helpful usage messages.
- Clear success and error feedback.
- Console-safe behavior.
- Player-only command checks where needed.
- Permission checks on every administrative operation.
- No unintended command execution by ordinary players.

Suggested permissions:

- `novaui.use`
- `novaui.admin`
- `novaui.editor`
- `novaui.reload`
- `novaui.open`
- `novaui.debug`
- `novaui.pack`

Document the exact behavior of each permission and provide a secure default permission configuration.

## 14. WEB EDITOR BACKEND AND SECURITY

NovaUI Studio must connect to the plugin through a well-defined communication layer.

Prefer a local-first workflow where projects can be created and validated without a live Minecraft server.

When a server connection is needed, provide a secure local development endpoint or another clearly documented transport.

Security requirements:

- Bind development services to localhost by default.
- Never expose an unauthenticated administrative editor to the public internet.
- Require authentication for remote publishing.
- Use short-lived or revocable credentials where appropriate.
- Validate every incoming request.
- Limit request sizes and upload sizes.
- Restrict asset paths to approved directories.
- Prevent path traversal.
- Prevent arbitrary file writes.
- Apply rate limits to sensitive endpoints.
- Do not expose server secrets to the frontend.
- Do not trust UI project data received from the browser.
- Protect publishing and administrative actions with permissions.
- Provide a clear way to disable the editor service.

Do not use an undocumented public HTTP endpoint as a shortcut.

If WebSockets or HTTP are used, implement clear request schemas, authentication, error responses, and version negotiation.

## 15. CONFIGURATION AND PROJECT FILES

Provide a clean plugin directory with documented files, for example:

plugins/NovaUI/
- config.yml
- messages.yml
- permissions.yml or equivalent documentation
- projects/
- assets/
- resourcepack/
- logs/ or diagnostic output if needed

Each project must have a stable identifier, schema version, metadata, component definitions, animation definitions, bindings, and references to its assets.

Use unique element IDs. Do not rely on display names as identifiers.

Validate imported data and reject malformed projects safely.

Provide sensible defaults and explanatory comments in configuration files.

Implement migrations for future schema changes and preserve backups before destructive upgrades.

Never silently reset a user's project because a newer version cannot parse it.

## 16. PERFORMANCE AND RELIABILITY

Performance is a core feature.

Design for servers with many concurrent players and multiple active interfaces.

Requirements:

- Keep expensive work off the main server thread whenever safe.
- Respect Bukkit/Paper thread-safety requirements.
- Perform Bukkit API operations on the correct scheduler.
- Use Folia-compatible scheduling only where explicitly implemented.
- Avoid unbounded asynchronous queues.
- Avoid per-player busy loops.
- Use configurable update rates and change detection.
- Batch compatible updates where possible.
- Cache parsed project definitions and reusable assets.
- Avoid recreating static components unnecessarily.
- Clean up listeners, tasks, entities, sessions, and resources.
- Prevent memory leaks and duplicate event handlers.
- Handle player disconnects, reloads, world changes, and plugin shutdown.
- Provide optional debug metrics for active sessions, render updates, animation counts, and processing time.

Implement safeguards for excessive component counts, excessively large projects, oversized assets, and unreasonable animation update rates.

Provide configurable limits and informative validation errors.

Do not promise zero latency or zero resource usage. Measure and optimize real behavior.

## 17. ERROR HANDLING AND DIAGNOSTICS

Provide meaningful error messages.

Examples of errors to handle:

- Invalid project JSON.
- Missing texture or font.
- Unsupported component.
- Unknown animation.
- Missing optional dependency.
- Invalid resource-pack metadata.
- Failed editor connection.
- Unauthorized publishing request.
- Unsupported Minecraft version.
- Incompatible API version.
- Invalid action configuration.
- Invalid data binding.
- Failed migration.

The plugin must not crash the server because one UI project is malformed.

Disable or reject the affected project safely, log a useful explanation, and continue operating wherever possible.

Provide a diagnostic command that reports plugin version, Minecraft version, active sessions, dependency status, resource-pack status, and relevant configuration problems without leaking credentials.

## 18. PROFESSIONAL VISUAL DESIGN

NovaUI Studio should feel like a polished professional creative tool.

Use:

- Consistent typography.
- Carefully designed spacing.
- A coherent icon system.
- Clear hover, selected, disabled, and focus states.
- Accessible contrast.
- Responsive editor panels.
- Useful tooltips.
- Empty states and onboarding.
- Confirmation dialogs for destructive actions.
- Clear loading, saving, and publishing states.
- A helpful validation panel.

Avoid placeholder buttons, dead links, fake notifications, and nonfunctional controls.

Use original branding and a consistent visual language.

The editor should remain usable when a project contains many components.

## 19. REQUIRED STARTER TEMPLATES

Include complete, working example projects:

1. Minimal HUD β€” player name, health, and status indicators.
2. Modern welcome screen β€” branding, buttons, and transitions.
3. Notification system β€” temporary success, warning, and error messages.
4. Custom menu β€” interactive elements with supported input.
5. Progress display β€” animated progress and dynamic values.
6. Server information overlay β€” player count and server statistics.
7. Quest tracker β€” objectives and progress.
8. Animated title screen β€” reusable transitions and effects.

Each template must include the actual project definition, required assets, configuration, and instructions.

Do not include templates that depend on nonexistent features.

## 20. TESTING AND ACCEPTANCE CRITERIA

Create automated tests wherever practical.

### Core tests

- Project loading and validation.
- Serialization and deserialization.
- Project schema migration.
- Layout calculations.
- Element IDs and hierarchy.
- Animation progression and easing.
- Data-binding resolution.
- Interaction hit testing.
- Permission enforcement.
- Resource-pack asset validation.
- Session lifecycle and cleanup.
- Malformed project handling.
- Authentication and request validation.

### Frontend tests

- Creating a project.
- Adding and selecting a component.
- Moving and resizing elements.
- Changing properties.
- Undo and redo.
- Saving and reopening.
- Importing and exporting.
- Timeline editing.
- Validation errors.
- Publishing failure and recovery.

### Integration tests

Verify that a real Minecraft server can load the plugin, open a project, render the supported UI elements, process actual supported interactions, and cleanly remove the UI when it closes.

Test the exact supported server versions.

If a full live-server environment is unavailable, build and run all tests possible in the workspace, clearly state what could not be tested, and provide reproducible manual test steps.

### Acceptance criteria

The project is not complete until:

- The plugin compiles into a valid JAR.
- The editor builds successfully.
- The plugin loads on the documented target server.
- A project can be created, saved, loaded, and published.
- At least one real HUD works in game.
- At least one real interactive interface works through the documented input mechanism.
- Animations run using actual runtime definitions.
- The resource-pack workflow produces a valid artifact when required.
- Permissions and security checks work.
- Invalid projects fail safely.
- Cleanup works on UI close and server shutdown.
- The example projects are usable.
- Documentation matches the actual implementation.

Never mark a feature as completed merely because its class, button, or configuration key exists.

## 21. IMPLEMENTATION WORKFLOW

Build the project in incremental, verifiable phases.

### Phase 1 β€” Feasibility and architecture

Inspect the environment, verify technical assumptions, document rendering and input constraints, choose the architecture, define module boundaries, and create the implementation plan.

### Phase 2 β€” Plugin foundation

Set up Gradle, Java, plugin metadata, configuration, commands, permissions, logging, project serialization, and basic automated tests.

Deliver a buildable plugin JAR.

### Phase 3 β€” Rendering prototype

Implement the simplest real, supported in-game UI. Verify that it renders on a live target server and can be removed safely.

Do not build the entire editor around an unverified renderer.

### Phase 4 β€” Input and interaction

Implement the chosen input adapter, hit testing, focus, interaction lifecycle, and a genuinely usable interactive example. Verify technical limitations early.

### Phase 5 β€” HUD and animation runtime

Implement HUD components, runtime updates, animations, lifecycle cleanup, and data bindings.

### Phase 6 β€” Resource-pack pipeline

Implement asset registration, validation, pack generation, versioning, and installation instructions.

### Phase 7 β€” Visual editor

Build the actual React/TypeScript application, canvas, component library, property inspector, project management, and live preview.

### Phase 8 β€” Editor-to-server integration

Connect the editor to the plugin using the documented, authenticated communication protocol. Implement publishing, validation, and meaningful error reporting.

### Phase 9 β€” Developer API and integrations

Add the Java API, example integration, optional adapters, and complete documentation.

### Phase 10 β€” Hardening and release

Run builds and tests, fix warnings and defects, verify supported environments, inspect resource cleanup, validate the example projects, and prepare a release package.

At the end of each phase:

1. Build the affected modules.
2. Run relevant tests.
3. Fix compilation errors and regressions before continuing.
4. Summarize completed functionality and remaining limitations.
5. Keep the project in a reproducible, buildable state.

## 22. CODE QUALITY REQUIREMENTS

Follow professional engineering practices.

- Use clear packages and descriptive class names.
- Apply single-responsibility principles.
- Prefer composition and interfaces over rigid inheritance.
- Keep configuration, rendering, interaction, storage, and editor communication separate.
- Avoid monolithic classes.
- Avoid duplicated business logic.
- Avoid excessive abstraction without a real benefit.
- Document public APIs and difficult implementation decisions.
- Use dependency injection or explicit constructor dependencies where practical.
- Validate inputs at system boundaries.
- Handle exceptions deliberately.
- Avoid empty catch blocks.
- Never use hardcoded machine-specific paths.
- Never commit secrets.
- Never include unexplained binary dependencies.
- Use deterministic builds where practical.
- Pin and verify dependency versions.
- Keep the frontend and backend protocols versioned.
- Include a clear project license file only after selecting a license deliberately.

## 23. REQUIRED DELIVERABLES

Deliver a complete, organized repository containing:

- Minecraft
Kodari AI
KodariOct 20 at 4:39 pm 2
NovaUI
NovaUI is a professional Minecraft UI framework and visual editor plugin for Paper servers. It provides a comprehensive in-game rendering engine with custom cursor input, animated HUDs, interactive screens, and a drag-and-drop web-based editor. Key features include a resource-pack pipeline for custom fonts and textures, a developer API, data bindings, animation timelines, and a secure local web editor. The plugin prioritizes reliability, performance, and safe cleanup, ensuring no entity or task leaks.
  1. Establish a buildable Paper 1.21.4 / Java 21 plugin foundation, with versioned JSON projects and validation.

  2. Implement a real inventory-based renderer and whitelist-only interactions; vanilla server APIs do not provide arbitrary mouse coordinates.

  3. Add /novaui commands, a developer API, a starter project, and documentation that distinguishes implemented features from future phases.

Created the NovaUI runtime foundation:

  • Paper 1.21.4 / Java 21 Gradle setup, plugin metadata, and configurable project limits.

  • Versioned JSON project loading and validation, with the starter project copied into the plugin folder on first startup.

  • A working inventory-based renderer with click/drag handling and whitelisted close, message, and open actions.

  • /novaui commands and a small Java API for opening, closing, and listing projects.

  • README documentation that states the vanilla cursor/input limitations and current compatibility boundary.

This is an initial runtime foundation, not the complete NovaUI ecosystem. The React Studio, HUD and animation systems, resource-pack generator, publishing workflow, and automated/live-server tests are not implemented yet.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
README.md
settings.gradle
Code
15 743
src/main/java/dev/novaui/NovaUIPlugin.java
package dev.novaui;

import dev.novaui.api.NovaUIApi;
import dev.novaui.project.ProjectRepository;
import dev.novaui.runtime.UiInventoryHolder;
import dev.novaui.runtime.UiRenderer;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.nio.file.Files;
import java.util.List;

public final class NovaUIPlugin extends JavaPlugin {
    private ProjectRepository projects;
    private UiRenderer renderer;
    private NovaUIApi api;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        if (!Files.exists(getDataFolder().toPath().resolve("projects/welcome.json"))) {
            saveResource("projects/welcome.json", false);
        }
        projects = new ProjectRepository(this);
        logReloadErrors(projects.reload());

        renderer = new UiRenderer(this, projects);
        getServer().getPluginManager().registerEvents(renderer, this);
        api = new NovaUIApi(projects, renderer);

        NovaUICommand command = new NovaUICommand(this);
        if (getCommand("novaui") == null) {
            getLogger().severe("Command 'novaui' is missing from plugin.yml; disabling plugin.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        getCommand("novaui").setExecutor(command);
        getCommand("novaui").setTabCompleter(command);
        getLogger().info("Loaded " + projects.getProjectIds().size() + " NovaUI project(s).");
    }

    @Override
    public void onDisable() {
        if (api == null) {
            return;
        }
        for (Player player : Bukkit.getOnlinePlayers()) {
            if (player.getOpenInventory().getTopInventory().getHolder() instanceof UiInventoryHolder) {
                api.close(player);
            }
        }
    }

    public NovaUIApi getApi() {
        return api;
    }

    List<String> reloadProjects() {
        return projects.reload();
    }

    private void logReloadErrors(List<String> errors) {
        for (String error : errors) {
            getLogger().warning(error);
        }
    }
}