am
This commit is contained in:
parent
bf40b49a2f
commit
2cc7701d06
4 changed files with 4 additions and 3 deletions
|
@ -60,7 +60,7 @@ public class GetStateTask extends BukkitRunnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
logger.info("Refreshing weather by " + source);
|
if (debug) logger.info("Refreshing weather by " + source);
|
||||||
if (source.equals("point")) {
|
if (source.equals("point")) {
|
||||||
State state = provider.request_state(pointLatitude, pointLongitude);
|
State state = provider.request_state(pointLatitude, pointLongitude);
|
||||||
if (debug) logger.info(String.format("Provider returned state %s %s (%s)", state.condition.name(), state.level.name(), state.simple.name()));
|
if (debug) logger.info(String.format("Provider returned state %s %s (%s)", state.condition.name(), state.level.name(), state.simple.name()));
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class MapUtils {
|
||||||
public double[] playerPosAsCoords(Location loc, double scaleLat, double scaleLon, int onExceed) {
|
public double[] playerPosAsCoords(Location loc, double scaleLat, double scaleLon, int onExceed) {
|
||||||
double[] out = new double[2];
|
double[] out = new double[2];
|
||||||
out[0] = loc.getX() * scaleLon;
|
out[0] = loc.getX() * scaleLon;
|
||||||
out[1] = loc.getZ() * scaleLat;
|
out[1] = -loc.getZ() * scaleLat;
|
||||||
if (onExceed == 1) {
|
if (onExceed == 1) {
|
||||||
out[0] = Math.max(-180.0, Math.min(180.0, out[0]));
|
out[0] = Math.max(-180.0, Math.min(180.0, out[0]));
|
||||||
out[1] = Math.max(-90.0, Math.min(90.0, out[1]));
|
out[1] = Math.max(-90.0, Math.min(90.0, out[1]));
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import pl.minecon724.realweather.provider.OpenWeatherMapProvider;
|
import pl.minecon724.realweather.provider.OpenWeatherMapProvider;
|
||||||
|
import pl.minecon724.thirdparty.Metrics;
|
||||||
|
|
||||||
public class RW extends JavaPlugin {
|
public class RW extends JavaPlugin {
|
||||||
FileConfiguration config;
|
FileConfiguration config;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
* Violations will result in a ban of your plugin and account from bStats.
|
* Violations will result in a ban of your plugin and account from bStats.
|
||||||
*/
|
*/
|
||||||
package pl.minecon724.realweather;
|
package pl.minecon724.realweather.thirdparty;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
Loading…
Reference in a new issue