[SPIGOT-5778] Get full gametime Created: 13/Jun/20  Updated: 12/Feb/21  Resolved: 12/Feb/21

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: rumickon Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: gametime

Version: -
Guidelines Read: Yes

 Description   

In villagers memory API we can obtain "last sleep" and "last worked" time in ticks.

This time is similar with actual gametime getting by command /time query gametime. But we cant get that time in plugins without NMS.



 Comments   
Comment by Shane Bee [ 14/Jun/20 ]

From my understanding World#getFullTime gets the time for the world, which can be reset when using `/time set 0` or World#setFullTime therefor would start counting up from 0 again, where as the time query gametime command would get the ticks since the server first started (well technically speaking, probably since the world first started).

Understandably we probably need a method, maybe World#getFullestOfTimes (I'm terrible with method names, forgive me, its horrible I know!) or World#getTimeSinceInception or World#getTimeSinceBigBang (omg someone stop me)
Maybe World#getGameTime (finally a serious one)

Comment by rumickon [ 13/Jun/20 ]

World#getFullTime() and /time query gametime give different results.

Comment by Parker Hawke [ 13/Jun/20 ]

Is there any difference between World#getFullTime()? Sure it doesn't access WorldData#getTime() but it seems to be what you're suggesting.

Generated at Sat Mar 29 12:04:38 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.