Skip to content

Maximum zero time return alternative for ICooldown.getRemaining() #24

@CosimoTiger

Description

@CosimoTiger

Request description

Developers will typically use ICooldown.getRemaining() to display to a player how much more they have to wait; displaying negative values usually doesn't make sense, though it can be useful, but therefore we should offer negative remaining time only as a secondary, and Math.max(0, remainder) as a primary feature.

Acceptance criteria

ICooldown.getRemaining() and .getRemaining(TimeUnit) or a new similar method returns 0 at minimum and never negative times when the cooldown has over-expired. Needs to be included in the tests.

Metadata

Metadata

Assignees

Labels

featureNew feature or request for one

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions