Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism

An open-source, fullscreen custom UI plugin/library for Paper Minecraft servers — the kind of freeform, pixel-positioned menu that chest GUIs can't do. Inspired by Sunscreen, which pioneered the idea but doesn't currently build as a project; Prism is an independent implementation, built to actually compile and to be approachable for contributors from day one.

Status: early foundation (v0.1). The core Screen/Element/click API is in place and works end-to-end, but the rendering pipeline is a vanilla Bukkit-API-only approximation for now — not yet a true look-anywhere, resourcepack-rendered fullscreen UI. See Roadmap.

What works today

  • A Screen + Element API: compose labels, buttons, and custom elements with pixel positions on a 128×128 canvas, click handlers, and re-render-on-change.
  • FullscreenDisplay shows a screen to a player by spawning an invisible item frame right in front of their eyes (holding a rendered MapView) and freezing them in place so it stays lined up.
  • Click detection via PlayerInteractAtEntityEvent, mapped from the frame's hit position back to canvas pixel coordinates.
  • /prism demo — a working example screen with a clickable button that updates its own label and color, to prove the render→click→re-render loop.

What doesn't work yet (by design, for now)

  • Only axis-aligned framing. The item frame can only be placed facing one of the four cardinal directions, computed from the player's yaw when the screen opens. Look somewhere off-axis first and the "fullscreen" effect will be crooked. A real look-anywhere fullscreen UI (matching Sunscreen) needs client-side packet rendering, not a world-placed entity — that's the big roadmap item below.
  • Click coordinate mapping is unverified. This project was bootstrapped in an environment with no graphical Minecraft client to test against. The hitbox → canvas-pixel math in PrismInteractListener is implemented from documented API behavior and geometric reasoning, not confirmed by eye. If clicks land in the wrong place for you, that's expected — see CONTRIBUTING.md.
  • 128×128 resolution ceiling, inherited from vanilla map items.

Roadmap

Roughly in order of what unlocks the most:

  1. Verify and fix click-mapping geometry against a real client (see above) — small, high-value, great first contribution.
  2. Text input elements — vanilla has no "click and type" primitive; this likely needs an anvil-rename-hack or a sign-edit-packet trick.
  3. Resourcepack-based rendering — move off item-frame+map entirely in favor of a custom font/bitmap system (à la Sunscreen), removing the axis-alignment limitation and enabling true look-anywhere fullscreen.
  4. Packet-level interaction (via packetevents or similar) for pixel-precise clicks/hover without relying on entity hitboxes.
  5. In-game / web layout editor, once the rendering model above is stable enough to design against.
  6. Themes and a component library beyond Label/Button.

Open an issue if you want to claim one of these, or propose something not listed.

Using the API

Screen screen = new Screen("My Menu").background(new Color(20, 20, 30));

screen.add(new Label(8, 8, 112, 12, "Hello!", Color.WHITE));

Button button = new Button(8, 30, 60, 16, "Click me",
        new Color(60, 90, 200), Color.WHITE, Color.WHITE);
button.onClick(ctx -> ctx.getPlayer().sendMessage("Clicked!"));
screen.add(button);

prism.getDisplay().open(player, screen);

Building

mvn package

Requires JDK 21+. Produces target/Prism-<version>.jar.

Requirements

  • Paper 26.1.x
  • Java 21+

Contributing

Wanted — this is meant to be a community project. See CONTRIBUTING.md for setup and where to start. Issues labeled good first issue are a good entry point.

License

MIT.

About

An open-source fullscreen custom UI library for Paper Minecraft servers (26.1+)

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages