Skip to content

More API Documentation for interacting with addonsΒ #17

@Joshinn-io

Description

@Joshinn-io

The documentation for working with addons exists, but isn't perfect. The Addon Request API is a bit lacking, and threw me for a loop until I got it figured out. This is just a basic request to add this to the wiki to maybe give people another, more specific example for working with OneBlock. This function will return the phase a player is currently in, if you give the function the player UUID.

    public String getPhase(UUID uuid){
        AddonRequestBuilder builder = new AddonRequestBuilder();
        Map<String, String> map = (Map<String, String>) builder
                .addon("AOneBlock")
                .label("island-stats")
                .addMetaData("player", uuid)
                .request();
        return map.get("phase");
    }

The example on the wiki only has an example where the method is static, and that doesn't work for Oneblock, the example also provides a one value map, not a map with multiple options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions