Skip to content

feat: Add World#hasWorldClock check - #14086

Open
feeeedox wants to merge 2 commits into
PaperMC:mainfrom
feeeedox:feat/has-world-clock
Open

feat: Add World#hasWorldClock check#14086
feeeedox wants to merge 2 commits into
PaperMC:mainfrom
feeeedox:feat/has-world-clock

Conversation

@feeeedox

Copy link
Copy Markdown

As I couldn’t find a direct way to check whether a world has a World Clock, I quickly added this method.

This is my first PR on Paper, I hope everything’s okay :)

@feeeedox
feeeedox requested a review from a team as a code owner July 19, 2026 16:03
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 19, 2026
@feeeedox feeeedox changed the title Add hasWorldClock check feat: Add World#hasWorldClock check Jul 19, 2026
@Lulu13022002

Copy link
Copy Markdown
Contributor

Might be better to wait for #14007 (comment). In this case this could just be a method on a new DimensionType object: (Nullable) WorldClock defaultClock()

@Warriorrrr

Copy link
Copy Markdown
Member

There's not really any PR for that in sight yet though, this single method seems simple enough to have until then

@papermc-projects papermc-projects Bot moved this from Awaiting review to Delayed approval in Paper PR Queue Aug 2, 2026
Comment thread paper-api/src/main/java/org/bukkit/World.java Outdated

@NonSwag NonSwag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I agree that such a getter is needed, especially since changing the time on a world without a clock throws now.
However, is it reasonable to add this method before a proper clock API is introduced just to supersede this method?

@feeeedox
feeeedox requested a review from NonSwag August 2, 2026 20:30
@kennytv

kennytv commented Aug 2, 2026

Copy link
Copy Markdown
Member

I will look into updating my old branch and creating a PR over the coming days

@kennytv kennytv added the status: blocked Issue or Request is waiting on some other issue or change. label Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: blocked Issue or Request is waiting on some other issue or change.

Projects

Status: Delayed approval

Development

Successfully merging this pull request may close these issues.

5 participants