Skip to content

Repository files navigation

🌤️ WeatherMod

A lightweight PaperMC Minecraft plugin that synchronizes in-game player weather and time with real-world city data using the OpenWeatherMap API.

✨ Features

  • 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 HttpClient and 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.

📋 Commands & Permissions

Command Description Permission
/weatherloc <city> Sets your real-world city for weather & time synchronization. Default (All players)

⚙️ Configuration

config.yml

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"

data.yml

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.

🛠️ Requirements & Tech Stack

  • Server Software: PaperMC (tested on version 1.21.11)
  • Language: Java 21
  • Build Tool: Gradle
  • Dependencies: Gson (bundled with Paper)

🚀 Installation

  1. Download the latest .jar release of the plugin.
  2. Drop the file into your server's plugins/ folder.
  3. Start or restart the server to generate the default configuration files.
  4. Open plugins/WeatherMod/config.yml, insert your OpenWeatherMap API key, and run /reload or restart the server.
  5. Join the game and type /weatherloc London (or your preferred city) to test it out!

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages