This commit is contained in:
Minecon724 2022-06-11 09:09:01 +00:00
parent bf40b49a2f
commit 2cc7701d06
4 changed files with 4 additions and 3 deletions

View file

@ -60,7 +60,7 @@ public class GetStateTask extends BukkitRunnable {
@Override
public void run() {
logger.info("Refreshing weather by " + source);
if (debug) logger.info("Refreshing weather by " + source);
if (source.equals("point")) {
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()));

View file

@ -10,7 +10,7 @@ public class MapUtils {
public double[] playerPosAsCoords(Location loc, double scaleLat, double scaleLon, int onExceed) {
double[] out = new double[2];
out[0] = loc.getX() * scaleLon;
out[1] = loc.getZ() * scaleLat;
out[1] = -loc.getZ() * scaleLat;
if (onExceed == 1) {
out[0] = Math.max(-180.0, Math.min(180.0, out[0]));
out[1] = Math.max(-90.0, Math.min(90.0, out[1]));

View file

@ -10,6 +10,7 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import pl.minecon724.realweather.provider.OpenWeatherMapProvider;
import pl.minecon724.thirdparty.Metrics;
public class RW extends JavaPlugin {
FileConfiguration config;

View file

@ -12,7 +12,7 @@
*
* 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.ByteArrayOutputStream;