Skip to content

Add Component-Methods to FileConfigurations #5449

@motz0815

Description

@motz0815

Is your feature request related to a problem?

The problem is that with the new Component-System, Adventure, that has been put into the Paper-API, everything's pretty much fine, but FileConfigurations, like the default config you can add to your plugin, does currently not have any methods related to Components.

Describe the solution you'd like.

It would be great to have methods for FileConfigurations regarding Components.
Such as:
getComponent(String path), which returns a Component,
getComponentList(String path) , which returns a List consisting of Components,
and maybe also getText and get TextList, for TextComponents, but that one is just QoL.

Because getString and getStringList both exist, it would be great to have the same methods for Components, without having to convert to one from a string or List.

Describe alternatives you've considered.

It is possible to get a plain String out of the config and then convert that one to a Component or TextComponent,
and it is also possible, easiest with an ArrayStream, to convert a List to a List, but if Adventure is now the only way to go, and all the methods containing Strings are deprecated now, it would be great to have simple methods for the new Types.

Agreements

I have searched for and ensured there isn't already an open issue regarding this.
I have ensured the feature I'm requesting isn't already in the latest supported Paper build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: futureIssue scheduled for resolution at some point in the future.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.
    No fields configured for Feature.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions