Setting up time/weather sync
By default, all of RealWorldSync features will be disabled. You can see default configuration for RealWorldSync here
Note: All interval values are in ticks. You can find a useful tick calculator here.
Time Sync Settings
time.enabled
(Default:false
)
If set to true, then time synchronization will work. Make sure that you set the options below after enabling this.time.update-interval
(Default:20
)
This configuration option allows you to change how often RealWorldSync updates your server's time.time.timezone
(Default:Europe/Berlin
)
Enter the time zone that you'd like to sync with here. You can find a list of timezone names here.
Weather Sync Settings
weather.enabled
(Default:false
)
If set to true, then weather synchronization will work. Make sure that you set the options below after enabling this.weather.update-interval
(Default:6000
)
This configuration option changes how often RealWorldSync will get weather information from OpenWeather and update your server's weather. We don't recommend to set this value below then 2400.weather.openweathermap-key
(Default:<nothing>
)
Put your OpenWeather API key here. Tutorial on how to get OpenWeatherMap key below. Keep this key in secret!weather.location.latitude
andweather.location.longitude
(Default values:0
and0
)
Put the latitude and longitude of the location that you want to sync your server's weather with here. You can find the latitude and longitude of a location here.
Getting an OpenWeather API key
To obtain an OpenWeatherMap API key, follow these steps:
Go to the OpenWeatherMap website and create an account if you don't have one already.
Once logged in, navigate to the "API Keys" section in your account settings.
Click on the "Generate" or "Create" button to generate a new API key.
Provide a name for your API key and select the desired subscription plan (free or paid).
After generating the API key, it will be displayed on the screen. Make sure to copy and securely store it.
Remember to keep your API key confidential and avoid sharing it publicly.
NOTE: OpenWeatherMap has a limit of 60 weather syncs per minute. If you're planning on running multiple servers or syncing the weather more often, you'll need to purchase a plan from OpenWeatherMap here.