chibbi / geobasedWeather

a small plugin, which allows you to configure, where you live, to make it rain in minecraft, when it rains in reality.

Home Page:https://www.spigotmc.org/resources/realtime-geobased-weather.88405/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geobased Weather

A spigot plugin, which synchronizes the weather of your minecraftserver with a reallife location.

Report Bug . Request Feature

License GitHub stars GitHub issues


This Plugin should work in every version from 1.8 to the latest (currently 1.18)

Quickstart guide

  1. You need an api key from openweathermap (the free tier is sufficient)
  2. Installing the plugin
    1. download the latest version
    2. move the jar file into your plugin folder
  3. Configure the plugin by either
    1. use the provided commands
      1. restart your server
      2. run /weather set apikey YOUR-API-KEY
      3. use the set command to change other variables as desired

    2. create the config file manually (NOT advised)
      1. create a file: plugins/geobasedWeather/config.yml
      2. replace YOUR-API-KEY with your actual apikey
      3. change the other two variables as desired and needed.
      4. restart your server
      5. If you encounter errors, just use set command

Commands

  1. Get information and configuration
    1. /weather get city
    2. /weather get world
    3. /weather get weather
    4. /weather get apikey
  2. Set configuration
    1. /weather set city YOUR-DESIRED-CITY
      examples for YOUR-DESIRED-CITY
      1. London
      2. Berlin
      3. London,uk
      4. Berlin,de
    2. /weather set world WORLD-NAME
    3. /weather set apikey YOUR-API-KEY
  3. stop
    Stops the plugin. The weather will return back to normal.
    Starting the plugin will require a server restart or reload.

Breakdown of apicalls

You can use a free plan from openweathermap for an accurate weather, because in the free version you have
60 calls/minute
1,000,000 calls/month
which are enough to make one call ca. 2.63seconds if you have the server up and running 24/7/30days a month

It is currently set on 1 call every 5 seconds, so don't worry about using up your api calls (because you won't) The Time between a call could be lowered, but it's not actually necessary.

If you think about it, the most it could ever lag behind is 5 seconds, and rain doesn't start and stop in 5 seconds so its more than fine.

Ideas for the further development

Add more Input possibilities. openweathermap also supports longitude and aptitude, which might be needed in some cases.
Actually important step: test the plugin in more mc versions
Make the time between api calls configurable, so you can f**k up.
But i have to say, the plugin does everything i would want it to do, so there is no reason for me to develop it further.
If you would like to see further development or specific features, just create an issue

About

a small plugin, which allows you to configure, where you live, to make it rain in minecraft, when it rains in reality.

https://www.spigotmc.org/resources/realtime-geobased-weather.88405/

License:GNU General Public License v3.0


Languages

Language:Java 100.0%