Get Server Time

How would you go about getting the Current server time in a plugin? I know that some vanilla servers report the time in chat when the message starts with Time, but how would you go about getting the time into a place where you could use it in your own chat messages in a plugin? (Ex. MOTD, Greeting Messages, etc. )


Ok thanks. Is there a way to get world time as well?

Probably within the main server object

This is the thing your looking for:

You can get it with calling this from the worldObject:

1 Like