Giter VIP home page Giter VIP logo

bukkitcurrentweather's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ilovekaban

bukkitcurrentweather's Issues

ときどき、天気が同期されずに変わってしまうことがある

ときどき、天気が同期されずに変わってしまうことがある。
現実では晴れなのに、サーバー起動時は同期されて晴れになるが、そのまま放置すると20分以内に雨が降りだしたりすることがある。

world.setWeatherDuration(Integer.MAX_VALUE);
world.setThunderDuration(Integer.MAX_VALUE);
を実行しているが、これらのAPIで Interger.MAX_VALUE (= 約21億) の受付をしているのかどうか、不明である。

org.bukkit.command.defaults.WeatherCommand では、指定可能な最大値として 1,000,000秒 (= 20,000,000ticks = 約11日間) が設定されているので、BukkitCurrentWeatherでも同様に、最大値として 20,000,000ticks を設定するように変更する。

コンフィグの intervalTicksSyncWeater の値の最小値を 12000 とする。および、コンフィグ名の誤記を修正する。

コンフィグの intervalTicksSyncWeater に設定可能な値は、現状自由になっているが、
あまりに小さい値を設定して連続でOpenWeatherMapへアクセスされても困るので、
最小値 12000ticks (= 10分) を設定する。

intervalTicksSyncWeater に、12000以下の数値を指定された場合は、自動的に12000へ変更する。

新しいAPIを使うように変更する

2015年10月9日に、OpenWeatherMapが更新されたらしく、新しいAPIを利用しないと動作しなくなってしまっていた。
新しいAPIを調査して、動作するように対応する。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.