Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ticks#infinite #2480

Merged
merged 2 commits into from
May 4, 2024
Merged

Add Ticks#infinite #2480

merged 2 commits into from
May 4, 2024

Conversation

aromaa
Copy link
Member

@aromaa aromaa commented Dec 18, 2023

Added Ticks#infinite and updated the documentation where providing it would not make sense.

@aromaa aromaa added the api-11 version: 1.20 label Dec 18, 2023
@aromaa
Copy link
Member Author

aromaa commented Dec 18, 2023

Some other alternatives that I don't quite like are that we could change the PotionEffect#duration type to Optional<Ticks> but that's quite vague. Would that imply that not specifying the duration in the builder mean that it creates a infinite one? That however could be solved with another method PotionEffect.Builder#infinite.

Adding new more concreate type like TicksOrInfinite is basically the same approach as the Optional<Ticks> one as we couldn't implement the Ticks interface or we are back at square one. Also adds more surface area for not much added clarity?

@aromaa aromaa merged commit 5b125a1 into api-11 May 4, 2024
9 checks passed
@aromaa aromaa deleted the api11/infinite-ticks branch May 4, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-11 version: 1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant