A lightweight PaperMC Minecraft plugin that synchronizes in-game player weather and time with real-world city data using the OpenWeatherMap API.
- Personalized Weather: Each player can set their own tracked city using a command, experiencing localized weather independently from others.
- Real-Time Day/Night Cycle: Synchronizes the player's in-game sun and moon positions with the actual local time of their chosen city.
- Asynchronous Requests: Uses Java's modern
HttpClientand Bukkit async tasks to fetch external data without causing server lag. - Immersive Effects: Triggers localized rainfall, custom ambient sound effects, and randomized lightning strikes for active thunderstorms.
- Auto-Updates: Automatically refreshes weather and time conditions for all active players at a regular interval (every 10 minutes).
- Data Persistence: Player city selections are safely saved to disk and automatically restored after a server restart.
- Memory Efficient: Automatically cleans up active task data when a player disconnects to prevent memory leaks.
| Command | Description | Permission |
|---|---|---|
/weatherloc <city> |
Sets your real-world city for weather & time synchronization. | Default (All players) |
When you first run the plugin, it will generate a config.yml file in the plugins/WeatherMod/ directory. You must insert your OpenWeatherMap API key here for the plugin to function:
# OpenWeatherMap API Key
api-key: "YOUR_API_KEY_HERE"An auto-generated file that acts as a database storing player UUIDs and their chosen cities. Do not edit this file manually while the server is running.
- Server Software: PaperMC (tested on version 1.21.11)
- Language: Java 21
- Build Tool: Gradle
- Dependencies: Gson (bundled with Paper)
- Download the latest
.jarrelease of the plugin. - Drop the file into your server's
plugins/folder. - Start or restart the server to generate the default configuration files.
- Open
plugins/WeatherMod/config.yml, insert your OpenWeatherMap API key, and run/reloador restart the server. - Join the game and type
/weatherloc London(or your preferred city) to test it out!