Skip to content

Folia support and custom minimessage output for papi#7

Open
UsainSrht wants to merge 3 commits intoVatten:mainfrom
UsainSrht:main
Open

Folia support and custom minimessage output for papi#7
UsainSrht wants to merge 3 commits intoVatten:mainfrom
UsainSrht:main

Conversation

@UsainSrht
Copy link
Copy Markdown

Added folia support with morepaperlib, using GracefulScheduling instead of BukkitScheduler.
Added a custom minimessage output for symbols to use it as rn minimessage doesn't support the serialization of the signed texture head components.

<signed_head:TEXTURE:SIGNATURE>
example code to use it

    TagResolver resolver;

    public SignedHeadTag(Set<String> names) {
        resolver = TagResolver.resolver(names, this::create);
    }

    Tag create(final ArgumentQueue args, final Context ctx) {

        String texture = args.popOr("signed head needs a texture").value();
        String signature = args.popOr("signed head needs a signature").value();

        Component headComponent = Component.object(
                ObjectContents.playerHead().profileProperty(
                        PlayerHeadObjectContents.property("textures", texture, signature)
                ).build()
        );

        return Tag.selfClosingInserting(headComponent);
    }

I was able to use fancytags in TAB plugin's scoreboard with this setup.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant