Skip to content

Cooldowns - Add CooldownStyle#267

Open
ItsNature wants to merge 1 commit intoversion/1.2.5from
improvement/cooldown-module
Open

Cooldowns - Add CooldownStyle#267
ItsNature wants to merge 1 commit intoversion/1.2.5from
improvement/cooldown-module

Conversation

@ItsNature
Copy link
Copy Markdown
Collaborator

@ItsNature ItsNature commented Apr 1, 2026

Overview

Description:
Allow customization of the visual appearance of the cooldown circle and text colors.

Changes:

  • Add CooldownStyle style field to the Cooldown builder
  • Update resource example with a working resource
  • Bump protos to 0.0.9

Code Example:

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

    apolloPlayerOpt.ifPresent(apolloPlayer -> {
        this.cooldownModule.displayCooldown(apolloPlayer, Cooldown.builder()
            .name("book-cooldown")
            .duration(Duration.ofSeconds(30))
            .icon(ItemStackIcon.builder()
                .itemName("BOOK")
                .build())
            .style(CooldownStyle.builder()
                .circleStartColor(ApolloColors.RED)
                .circleEndColor(ApolloColors.GREEN)
                .circleEdgeColor(ApolloColors.DARK_GRAY)
                .textColor(ApolloColors.LIGHT_PURPLE)
                .build())
            .build()
        );
    });
}

Screenshots and/or Videos:
image


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 1, 2026
@ItsNature ItsNature mentioned this pull request Apr 1, 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.

3 participants