Skip to content

Namespace support for background texture #22

Open
@JasperBouwman

Description

Hello,

I am looking at your API, and my first impression is that it looks nice and should work for my plugin.
As I am experimenting with some of the features, I wanted to set the background of a new tab I created. But in here I have an issue:

The default namespace you use is Minecraft, can you change the type of the background texture from String to NameKey, so that you can set your own namespace?
In PacketConverter.java at line 64 you will have to use the constructor of the Resource location.

For my plugin I use the namespace 'Minecraft' for the minecraft models, and in the 'tport' namespace folder I place my own custom textures. I do this to separate Minecraft and my plugin. TPort is the name of my plugin.

The next issue I have is that you can only have one BaseComponent inside your AdvancementDisplay.
As a final touch, for this display I would like to directly input this title/description as JSON, since for my plugin I've wrote my own message handler (not using the TextComponent API from spigot). Because of this I can not use your API directly.
This could be a quick fix. In your JSONMessage you can store an array with BaseMessage or a String with the raw JSON.
In the method of getBaseComponent you will check if one of these types are non null, and parse this in the ChatSerializer (with the BaseComponent using ComponentSerializer.toString).

I hope you will take this in consideration.

Best regards,
Jasper

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions