Skip to content

Add Profile to ItemStackIcon#274

Open
ItsNature wants to merge 4 commits intoversion/1.2.6from
feature/item-stack-icon-skull-textures
Open

Add Profile to ItemStackIcon#274
ItsNature wants to merge 4 commits intoversion/1.2.6from
feature/item-stack-icon-skull-textures

Conversation

@ItsNature
Copy link
Copy Markdown
Collaborator

@ItsNature ItsNature commented Apr 30, 2026

Overview

Description:
Add Profile to ItemStackIcon for player head texture support.

Code Example:

public void displayCooldownWithPlayerTextureExample(Player viewer) {
    Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());

    apolloPlayerOpt.ifPresent(apolloPlayer -> {
        this.cooldownModule.displayCooldown(apolloPlayer, Cooldown.builder()
            .name("player-head-cooldown")
            .duration(Duration.ofSeconds(15))
            .icon(ItemStackIcon.builder()
                .itemName("PLAYER_HEAD") // use "skull" for legacy with customModelData set to 3
                .profile(Profile.builder()
                    .id(UUID.fromString("f17627d8-1a97-487b-92ea-c04f413394bd"))
                    .texture("e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWQ4MjUwNWJjZjNiYTU5YzJiZTdlMmQzNmY0ZTJiZGE4MzZmMmZkMTk0YjYyMTJhMmExYzRiNGEyYTQ3MWUifX19")
                    .signature("")
                    .build())
                .build()
            )
            .build()
        );
    });
}

Related Issue (If applicable):

Screenshots and/or Videos (If applicable):


Review Request Checklist

  • Your code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have tested this change myself. (If applicable)
  • I have made corresponding changes to the documentation. (If applicable)
  • The branch name follows the projects naming conventions. (e.g. feature/add-module & bugfix/fix-issue)

@ItsNature ItsNature added type: Documentation Documentation improvement or issue type: Enhancement Feature improvement or addition labels Apr 30, 2026
@ItsNature ItsNature mentioned this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Documentation Documentation improvement or issue type: Enhancement Feature improvement or addition

Development

Successfully merging this pull request may close these issues.

2 participants