SomeSourceCode / SomeGuiApi

A Paper API to create interactable GUIs using Minecraft Inventories, ...
MIT License
1 stars 0 forks source link

Hide internal API #13

Closed SomeSourceCode closed 3 months ago

SomeSourceCode commented 3 months ago

Description

Hide internal API methods in accordance with #6.

This is achieved by introducing helper classes. These classes are named after the classes they assist, followed by the Helper prefix. New internal methods must be added to the corresponding interfaces, and new helper classes must adhere to this naming convention.

Examples

NodeHelper.setScene(node, scene);
SceneHelper.setGui(scene, gui);
GuiHelper.setDirtyFlag(gui, flag);

Note that while the methods can still technically be called by the application, they can no longer be called directly on the respective classes.