TheAPI icon indicating copy to clipboard operation
TheAPI copied to clipboard

DOCUMENTATION

Open blitzdose opened this issue 2 years ago • 3 comments

Hi,

your API is great. It should make it easy to implement stuff like GUIs but with practically zero documentation it's tough to use. Your examples are not nearly enough to start coding with your API. I also noticed that the Discord invitation is not valid anymore so there is no place where I could ask for help.

I already mentioned the missing documentation a year ago as a spigot.mc review but nothing has changed since then. Even just using Javadoc would help because at the moment I have to dig through your code just to know what methods there are and try to guess what exactly they do. My current problem is "How can I add a ClickListener on an Iiem in a GUI?" The demo only shows how to add an Item.

blitzdose avatar Jan 05 '24 20:01 blitzdose

Hi, sorry for the complications, I have a lot on my plate at the moment. The discord link should be fixed. Alternatively: https://discord.gg/APwYKQRxby You can contact me directly there and I'll give you tips on the API if you do. Otherwise regarding the GUI and ItemGUI, Click Event is implemented directly in ItemGUI as an abstract method.

GUI gui = new GUI("title here", GUI.LINES_6);
gui.setItem(0, new ItemGUI(ItemMaker.of(XMaterial.STONE).displayName("&7Stone!").build()) {
	
	@Override
	public void onClick(Player player, HolderGUI gui, ClickType click) {
		player.sendMessage("You clicked on stone.");
		gui.close(player);
	}
});
gui.open(target)```

Straikerinos avatar Jan 05 '24 21:01 Straikerinos

Hi, thanks for the clarification. Don't worry take your time. But would be nice if a documentation would be prioritized. For developers its just a nightmare otherwise :)

blitzdose avatar Jan 05 '24 21:01 blitzdose