Skip to content

New API for developers #304

@d0by1

Description

@d0by1

Just making sure

  • I have read the wiki and made sure, this feature is not yet in the plugin.
  • I believe, that this feature is possible to implement.
  • I made sure, that this feature has not been requested yet.

Problem

DecentHolograms currently lacks a true public API. Instead, plugin authors have been forced to rely on our internal classes, which creates several problems:

  1. Overexposed internals
    Developers can access anything in the codebase—even parts they shouldn’t—which increases the risk of unintended side effects.

  2. Breaking changes risk
    Every time we refactor or improve internal code, we must preserve backwards compatibility with whatever developers have accidentally relied on, limiting our ability to iterate.

  3. Bloated, tangled “API”
    Over time the internals have grown into a disorganized mess. That not only makes it hard for us to build new features, but also forces third‑party authors to navigate a confusing and unstable surface.

Feature

Build a dedicated Developer API—completely separate from DecentHolograms’ internal code—that makes creating and managing holograms from other plugins a breeze. This API will expose only what’s needed through clean, well‑documented interfaces and utility classes, so developers never have to touch DH’s private logic.

Key features:

  • Isolated holograms:
    Each API instance gets its own hologram registry. Holograms users create with the API won’t interfere with DH’s built‑in holograms or anyone else’s.

  • Builders & utilities:
    For example, a simple, chainable HologramBuilder (and related helpers) will let users define, display, update, and destroy holograms in just a few lines of code.

  • Visibility management:
    Let developers plug in their own logic to show, hide, or update holograms on a per‑player basis.

  • Documentation & examples:
    Ship the API with Javadoc and sample code snippets to show common use cases and patterns.

Once the new Developer API is in place, the internal classes and methods will be officially deprecated, and they will be removed entirely in a future version. This should hopefully give developers enough time to switch to the new API.

Alternatives

No response

Metadata

Metadata

Assignees

Labels

effort: highSignificant work required. May involve major changes or architectural considerations.type: suggestionNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions