From 90205881f8a34ecd678301fd48b5fc3961552df8 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 1 Jun 2024 19:35:15 +0200 Subject: [PATCH] commit today's work even if this compiles it's unlikely to work properly this has been my most productive ever well maybe not ever but lately for sure --- .gitignore | 2 + README.md | 1 + pom.xml | 71 +++++++++- .../java/eu/m724/realweather/DebugLogger.java | 18 +++ .../m724/realweather/RealWeatherPlugin.java | 124 ++++++++++++++++++ .../eu/m724/realweather/mapper/Mapper.java | 54 ++++++++ .../m724/realweather/mapper/MapperConfig.java | 37 ++++++ .../mapper/MapperEventHandler.java | 24 ++++ .../realweather/object/UserException.java | 11 ++ .../realweather/thunder/ThunderConfig.java | 25 ++++ .../realweather/thunder/ThunderMaster.java | 67 ++++++++++ .../m724/realweather/thunder/ThunderTask.java | 44 +++++++ .../eu/m724/realweather/time/TimeConfig.java | 23 ++++ .../eu/m724/realweather/time/TimeMaster.java | 34 +++++ .../realweather/weather/WeatherConfig.java | 29 ++++ .../realweather/weather/WeatherMaster.java | 48 +++++++ src/main/resources/config.yml | 17 +++ src/main/resources/map.yml | 24 ++++ src/main/resources/modules/thunder.yml | 12 ++ src/main/resources/modules/time.yml | 17 +++ src/main/resources/modules/weather.yml | 19 +++ src/main/resources/plugin.yml | 43 ++++++ .../maven/eu.m724/realweather/pom.properties | 2 +- .../maven/eu.m724/realweather/pom.xml | 71 +++++++++- target/classes/config.yml | 17 +++ .../eu/m724/realweather/DebugLogger.class | Bin 0 -> 878 bytes .../m724/realweather/RealWeatherPlugin.class | Bin 0 -> 5484 bytes .../eu/m724/realweather/mapper/Mapper.class | Bin 0 -> 2242 bytes .../realweather/mapper/MapperConfig.class | Bin 0 -> 1434 bytes .../mapper/MapperEventHandler.class | Bin 0 -> 1228 bytes .../realweather/object/UserException.class | Bin 0 -> 449 bytes .../realweather/thunder/ThunderConfig.class | Bin 0 -> 977 bytes .../realweather/thunder/ThunderMaster.class | Bin 0 -> 3570 bytes .../realweather/thunder/ThunderTask.class | Bin 0 -> 3537 bytes .../eu/m724/realweather/time/TimeConfig.class | Bin 0 -> 872 bytes .../eu/m724/realweather/time/TimeMaster.class | Bin 0 -> 928 bytes .../realweather/weather/WeatherConfig.class | Bin 0 -> 1020 bytes .../realweather/weather/WeatherMaster.class | Bin 0 -> 1873 bytes target/classes/map.yml | 24 ++++ target/classes/modules/thunder.yml | 12 ++ target/classes/modules/time.yml | 17 +++ target/classes/modules/weather.yml | 19 +++ target/classes/plugin.yml | 43 ++++++ 43 files changed, 940 insertions(+), 9 deletions(-) create mode 100644 .gitignore create mode 100644 src/main/java/eu/m724/realweather/DebugLogger.java create mode 100644 src/main/java/eu/m724/realweather/RealWeatherPlugin.java create mode 100644 src/main/java/eu/m724/realweather/mapper/Mapper.java create mode 100644 src/main/java/eu/m724/realweather/mapper/MapperConfig.java create mode 100644 src/main/java/eu/m724/realweather/mapper/MapperEventHandler.java create mode 100644 src/main/java/eu/m724/realweather/object/UserException.java create mode 100644 src/main/java/eu/m724/realweather/thunder/ThunderConfig.java create mode 100644 src/main/java/eu/m724/realweather/thunder/ThunderMaster.java create mode 100644 src/main/java/eu/m724/realweather/thunder/ThunderTask.java create mode 100644 src/main/java/eu/m724/realweather/time/TimeConfig.java create mode 100644 src/main/java/eu/m724/realweather/time/TimeMaster.java create mode 100644 src/main/java/eu/m724/realweather/weather/WeatherConfig.java create mode 100644 src/main/java/eu/m724/realweather/weather/WeatherMaster.java create mode 100644 src/main/resources/config.yml create mode 100644 src/main/resources/map.yml create mode 100644 src/main/resources/modules/thunder.yml create mode 100644 src/main/resources/modules/time.yml create mode 100644 src/main/resources/modules/weather.yml create mode 100644 src/main/resources/plugin.yml create mode 100644 target/classes/config.yml create mode 100644 target/classes/eu/m724/realweather/DebugLogger.class create mode 100644 target/classes/eu/m724/realweather/RealWeatherPlugin.class create mode 100644 target/classes/eu/m724/realweather/mapper/Mapper.class create mode 100644 target/classes/eu/m724/realweather/mapper/MapperConfig.class create mode 100644 target/classes/eu/m724/realweather/mapper/MapperEventHandler.class create mode 100644 target/classes/eu/m724/realweather/object/UserException.class create mode 100644 target/classes/eu/m724/realweather/thunder/ThunderConfig.class create mode 100644 target/classes/eu/m724/realweather/thunder/ThunderMaster.class create mode 100644 target/classes/eu/m724/realweather/thunder/ThunderTask.class create mode 100644 target/classes/eu/m724/realweather/time/TimeConfig.class create mode 100644 target/classes/eu/m724/realweather/time/TimeMaster.class create mode 100644 target/classes/eu/m724/realweather/weather/WeatherConfig.class create mode 100644 target/classes/eu/m724/realweather/weather/WeatherMaster.class create mode 100644 target/classes/map.yml create mode 100644 target/classes/modules/thunder.yml create mode 100644 target/classes/modules/time.yml create mode 100644 target/classes/modules/weather.yml create mode 100644 target/classes/plugin.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..731eb43 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target/ +/.settings/ diff --git a/README.md b/README.md index efb6c91..2bebbf8 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ differences compared to v0: - weather levels \ it's not like there's strong rain or there's no rain \ I'm not sure how yet +- sunrise sunset - snow - more api providers, multiple api keys - extensible: api diff --git a/pom.xml b/pom.xml index 46ffdff..c5030e3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,69 @@ - 4.0.0 - eu.m724 - realweather - 0.9-SNAPSHOT + 4.0.0 + eu.m724 + realweather + 0.9-SNAPSHOT + + + 17 + 17 + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + 724rocks + https://git.724.rocks/api/packages/Minecon724/maven + + + + + + org.spigotmc + spigot-api + 1.20.6-R0.1-SNAPSHOT + provided + + + eu.m724 + wtapi + 0.2 + + + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + package + + shade + + + true + + + eu.m724:wtapi + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/eu/m724/realweather/DebugLogger.java b/src/main/java/eu/m724/realweather/DebugLogger.java new file mode 100644 index 0000000..5d2253f --- /dev/null +++ b/src/main/java/eu/m724/realweather/DebugLogger.java @@ -0,0 +1,18 @@ +package eu.m724.realweather; + +import java.util.logging.Logger; + +public class DebugLogger { + static Logger baseLogger; + static int debugLevel; + + public static int getDebugLevel() { + return debugLevel; + } + + + public static void info(String message, int minDebugLevel, Object... format) { + if (debugLevel >= minDebugLevel) + baseLogger.info(String.format(message, format)); + } +} diff --git a/src/main/java/eu/m724/realweather/RealWeatherPlugin.java b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java new file mode 100644 index 0000000..4299f62 --- /dev/null +++ b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java @@ -0,0 +1,124 @@ +package eu.m724.realweather; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.logging.Logger; + +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.java.JavaPlugin; + +import com.google.common.base.Charsets; + +import eu.m724.realweather.mapper.Mapper; +import eu.m724.realweather.mapper.MapperConfig; +import eu.m724.realweather.object.UserException; +import eu.m724.realweather.thunder.ThunderConfig; +import eu.m724.realweather.thunder.ThunderMaster; +import eu.m724.realweather.time.TimeConfig; +import eu.m724.realweather.time.TimeMaster; +import eu.m724.realweather.weather.WeatherConfig; +import eu.m724.realweather.weather.WeatherMaster; +import eu.m724.wtapi.provider.exception.ProviderException; + +public class RealWeatherPlugin extends JavaPlugin { + private Mapper mapper; + private WeatherMaster weatherMaster; + private ThunderMaster thunderMaster; + private TimeMaster timeMaster; + + private YamlConfiguration config; + private Logger logger; + + private YamlConfiguration mapConfig; + + @Override + public void onEnable() { + logger = getLogger(); + + File dataFolder = getDataFolder(); + File modulesFolder = new File(dataFolder, "modules"); + modulesFolder.mkdir(); + + YamlConfiguration configuration, + mapConfiguration, weatherConfiguration, + thunderConfiguration, timeConfiguration; + + DebugLogger.info("loading configurations", 1); + + try { + configuration = getConfig(new File(dataFolder, "config.yml")); + mapConfiguration = getConfig(new File(dataFolder, "map.yml")); + weatherConfiguration = getConfig(new File(modulesFolder, "weather.yml")); + thunderConfiguration = getConfig(new File(modulesFolder, "thunder.yml")); + timeConfiguration = getConfig(new File(modulesFolder, "time.yml")); + } catch (IOException e) { + logger.severe("Failed to load config!"); + e.printStackTrace(); + + getServer().getPluginManager().disablePlugin(this); + return; + } + + DebugLogger.baseLogger = logger; + DebugLogger.debugLevel = configuration.getInt("debug"); + + if (configuration.getBoolean("enabled")) { + logger.info("plugin disabled by admin"); + getServer().getPluginManager().disablePlugin(this); + } + + DebugLogger.info("loading mapper", 1); + mapper = new Mapper( + MapperConfig.fromConfiguration(mapConfiguration)); + + try { + DebugLogger.info("loading weather", 1); + weatherMaster = new WeatherMaster( + WeatherConfig.fromConfiguration(weatherConfiguration), mapper); + weatherMaster.init(); + + DebugLogger.info("loading thunder", 1); + thunderMaster = new ThunderMaster( + ThunderConfig.fromConfiguration(thunderConfiguration), mapper, this); + thunderMaster.init(); + + DebugLogger.info("loading time", 1); + timeMaster = new TimeMaster( + TimeConfig.fromConfiguration(timeConfiguration), mapper); + timeMaster.init(); + } catch (UserException e) { + logger.severe("There are errors in your config:"); + logger.severe(e.getMessage()); + + getServer().getPluginManager().disablePlugin(this); + } catch (ProviderException e) { + logger.severe("Couldn't initialize provider!"); + logger.severe("Possible causes:"); + logger.severe("1. Your API key is invalid"); + logger.severe("2. The provider or your internet is down"); + e.printStackTrace(); + + getServer().getPluginManager().disablePlugin(this); + } + + DebugLogger.info("ended loading", 1); + } + + public YamlConfiguration getConfig(File configFile) throws IOException { + YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); + + if (!configFile.exists()) { + final InputStream defConfigStream = getResource("config.yml"); + + if (defConfigStream == null) + return null; + + config = YamlConfiguration.loadConfiguration(new InputStreamReader(defConfigStream, Charsets.UTF_8)); + config.save(configFile); + } + + return config; + } +} diff --git a/src/main/java/eu/m724/realweather/mapper/Mapper.java b/src/main/java/eu/m724/realweather/mapper/Mapper.java new file mode 100644 index 0000000..27c843f --- /dev/null +++ b/src/main/java/eu/m724/realweather/mapper/Mapper.java @@ -0,0 +1,54 @@ +package eu.m724.realweather.mapper; + +import java.util.List; + +import org.bukkit.Location; +import org.bukkit.World; + +import eu.m724.wtapi.object.Coordinates; + +public class Mapper { + private MapperConfig config; + private List worlds; + + public Mapper(MapperConfig config) { + this.config = config; + } + + public Coordinates locationToCoordinates(Location location) { + double latitude = -location.getZ() / config.scaleLatitude; + double longitude = location.getX() / config.scaleLongitude; + + return new Coordinates(latitude, longitude); + } + + public Location coordinatesToLocation(World world, Coordinates coordinates) { + double x = -coordinates.latitude * config.scaleLatitude; + double z = coordinates.longitude * config.scaleLongitude; + + return new Location(world, x, 0, z); + + } + + public Coordinates getPoint() { + return config.point; + } + + public List getWorlds() { + return this.worlds; + } + + boolean loadWorld(World world) { + boolean loaded = config.worlds.contains(world.getName()) ^ config.worldBlacklist; + + if (loaded) + worlds.add(world); + + return loaded; + } + + void unloadWorld(World world) { + worlds.remove(world); + } + +} diff --git a/src/main/java/eu/m724/realweather/mapper/MapperConfig.java b/src/main/java/eu/m724/realweather/mapper/MapperConfig.java new file mode 100644 index 0000000..bbe33cb --- /dev/null +++ b/src/main/java/eu/m724/realweather/mapper/MapperConfig.java @@ -0,0 +1,37 @@ +package eu.m724.realweather.mapper; + +import java.util.List; + +import org.bukkit.configuration.ConfigurationSection; + +import eu.m724.wtapi.object.Coordinates; + +public class MapperConfig { + public boolean enabled; + + public boolean worldBlacklist; + public List worlds; + + public int scaleLatitude; + public int scaleLongitude; + + public Coordinates point; + + public static MapperConfig fromConfiguration(ConfigurationSection configuration) { + MapperConfig mapperConfig = new MapperConfig(); + + mapperConfig.enabled = configuration.getBoolean("enabled"); + + mapperConfig.worldBlacklist = configuration.getBoolean("worldBlacklist"); + mapperConfig.worlds = configuration.getStringList("worlds"); + + mapperConfig.scaleLatitude = configuration.getInt("dimensions.latitude"); + mapperConfig.scaleLongitude = configuration.getInt("dimensions.longitude"); + + mapperConfig.point = new Coordinates( + configuration.getDouble("point.latitude"), + configuration.getDouble("point.longitude")); + + return mapperConfig; + } +} diff --git a/src/main/java/eu/m724/realweather/mapper/MapperEventHandler.java b/src/main/java/eu/m724/realweather/mapper/MapperEventHandler.java new file mode 100644 index 0000000..499420c --- /dev/null +++ b/src/main/java/eu/m724/realweather/mapper/MapperEventHandler.java @@ -0,0 +1,24 @@ +package eu.m724.realweather.mapper; + +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.world.WorldLoadEvent; +import org.bukkit.event.world.WorldUnloadEvent; + +public class MapperEventHandler implements Listener { + private Mapper mapper; + + public MapperEventHandler(Mapper mapper) { + this.mapper = mapper; + } + + @EventHandler + public void onWorldLoad(WorldLoadEvent e) { + mapper.loadWorld(e.getWorld()); + } + + @EventHandler + public void onWorldUnload(WorldUnloadEvent e) { + mapper.unloadWorld(e.getWorld()); + } +} diff --git a/src/main/java/eu/m724/realweather/object/UserException.java b/src/main/java/eu/m724/realweather/object/UserException.java new file mode 100644 index 0000000..af04a19 --- /dev/null +++ b/src/main/java/eu/m724/realweather/object/UserException.java @@ -0,0 +1,11 @@ +package eu.m724.realweather.object; + +public class UserException extends Exception { + + private static final long serialVersionUID = 6850666306511891275L; + + public UserException(String message) { + super(message); + } + +} diff --git a/src/main/java/eu/m724/realweather/thunder/ThunderConfig.java b/src/main/java/eu/m724/realweather/thunder/ThunderConfig.java new file mode 100644 index 0000000..24be3c1 --- /dev/null +++ b/src/main/java/eu/m724/realweather/thunder/ThunderConfig.java @@ -0,0 +1,25 @@ +package eu.m724.realweather.thunder; + +import org.bukkit.configuration.ConfigurationSection; + +import eu.m724.realweather.time.TimeConfig; + +public class ThunderConfig { + public boolean enabled; + + public String provider; + + // how often refresh in ms + public int refresh; + + public static ThunderConfig fromConfiguration(ConfigurationSection configuration) { + ThunderConfig thunderConfig = new ThunderConfig(); + + thunderConfig.enabled = configuration.getBoolean("enabled"); + thunderConfig.provider = configuration.getString("provider"); + + thunderConfig.refresh = configuration.getInt("refresh"); + + return thunderConfig; + } +} diff --git a/src/main/java/eu/m724/realweather/thunder/ThunderMaster.java b/src/main/java/eu/m724/realweather/thunder/ThunderMaster.java new file mode 100644 index 0000000..d484d98 --- /dev/null +++ b/src/main/java/eu/m724/realweather/thunder/ThunderMaster.java @@ -0,0 +1,67 @@ +package eu.m724.realweather.thunder; + +import java.util.ArrayList; + +import org.bukkit.Bukkit; +import org.bukkit.plugin.Plugin; + +import eu.m724.realweather.DebugLogger; +import eu.m724.realweather.mapper.Mapper; +import eu.m724.realweather.object.UserException; +import eu.m724.wtapi.provider.WeatherProvider; +import eu.m724.wtapi.provider.exception.ProviderException; +import eu.m724.wtapi.provider.impl.openweathermap.OpenWeatherMapProvider; +import eu.m724.wtapi.thunder.ThunderProvider; +import eu.m724.wtapi.thunder.impl.lightningmaps.LightningMapsProvider; +import eu.m724.wtapi.thunder.impl.lightningmaps.TimedStrike; + +public class ThunderMaster { + private ThunderConfig config; + private Mapper mapper; + private ThunderProvider provider; + private Plugin plugin; + private ThunderTask thunderTask; + + ArrayList strikes = new ArrayList<>(); + + public ThunderMaster(ThunderConfig config, Mapper mapper, Plugin plugin) { + this.config = config; + this.mapper = mapper; + this.plugin = plugin; + } + + /** + * initializes, tests and starts + * @throws UserException config issue + * @throws ProviderException if provider initialization failed + */ + public void init() throws UserException, ProviderException { + if (!config.enabled) + return; + + provider = createProvider(); + + if (provider == null) + throw new UserException("Invalid provider: " + config.provider); + + provider.init(); + + provider.registerStrikeHandler(coords -> { + strikes.add(new TimedStrike(System.currentTimeMillis() + provider.getDelay(), coords)); + }); + + thunderTask = new ThunderTask(this, mapper); + thunderTask.runTaskTimer(plugin, 0, config.refresh); + + DebugLogger.info("thunder loaded", 1); + } + + private ThunderProvider createProvider() { + switch (config.provider) { + case "lightningmaps": + return new LightningMapsProvider(); + } + + return null; + } +} diff --git a/src/main/java/eu/m724/realweather/thunder/ThunderTask.java b/src/main/java/eu/m724/realweather/thunder/ThunderTask.java new file mode 100644 index 0000000..2da03e1 --- /dev/null +++ b/src/main/java/eu/m724/realweather/thunder/ThunderTask.java @@ -0,0 +1,44 @@ +package eu.m724.realweather.thunder; + +import org.bukkit.Location; +import org.bukkit.entity.EntityType; +import org.bukkit.scheduler.BukkitRunnable; + +import eu.m724.realweather.DebugLogger; +import eu.m724.realweather.mapper.Mapper; +import eu.m724.wtapi.thunder.impl.lightningmaps.TimedStrike; + +class ThunderTask extends BukkitRunnable { + private ThunderMaster thunderMaster; + private Mapper mapper; + + public ThunderTask(ThunderMaster thunderMaster, Mapper mapper) { + this.thunderMaster = thunderMaster; + this.mapper = mapper; + } + + @Override + public void run() { + DebugLogger.info("thundertask running", 3); + while (thunderMaster.strikes.size() > 0) { + TimedStrike strike = thunderMaster.strikes.get(0); + thunderMaster.strikes.remove(0); + + DebugLogger.info("strike: %f %f", 2, strike.coordinates.latitude, strike.coordinates.longitude); + + mapper.getWorlds().forEach(w -> { + Location location = mapper.coordinatesToLocation(w, strike.coordinates); + DebugLogger.info("in %s that converts to: %d %d %d", 2, w.getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()); + + if (w.getChunkAt(location).isLoaded()) { + location.setY(w.getHighestBlockYAt(location)); + w.spawnEntity(location, EntityType.LIGHTNING_BOLT); + DebugLogger.info("spawnd lightning in %s on y level %d", 2, w.getName(), location.getBlockY()); + } + + }); + } + + } + +} diff --git a/src/main/java/eu/m724/realweather/time/TimeConfig.java b/src/main/java/eu/m724/realweather/time/TimeConfig.java new file mode 100644 index 0000000..a1ec56b --- /dev/null +++ b/src/main/java/eu/m724/realweather/time/TimeConfig.java @@ -0,0 +1,23 @@ +package eu.m724.realweather.time; + +import org.bukkit.configuration.ConfigurationSection; + +public class TimeConfig { + public boolean enabled; + + // state is per player + public boolean dynamic; + // x day cycles in 1 irl day + public double modifier; + + public static TimeConfig fromConfiguration(ConfigurationSection configuration) { + TimeConfig timeConfig = new TimeConfig(); + + timeConfig.enabled = configuration.getBoolean("enabled"); + + timeConfig.dynamic = configuration.getBoolean("dynamic"); + timeConfig.modifier = configuration.getDouble("modifier"); + + return timeConfig; + } +} diff --git a/src/main/java/eu/m724/realweather/time/TimeMaster.java b/src/main/java/eu/m724/realweather/time/TimeMaster.java new file mode 100644 index 0000000..5008fd8 --- /dev/null +++ b/src/main/java/eu/m724/realweather/time/TimeMaster.java @@ -0,0 +1,34 @@ +package eu.m724.realweather.time; + +import java.util.ArrayList; + +import eu.m724.realweather.DebugLogger; +import eu.m724.realweather.mapper.Mapper; +import eu.m724.realweather.object.UserException; +import eu.m724.realweather.thunder.ThunderConfig; +import eu.m724.wtapi.provider.exception.ProviderException; +import eu.m724.wtapi.thunder.ThunderProvider; +import eu.m724.wtapi.thunder.impl.lightningmaps.LightningMapsProvider; +import eu.m724.wtapi.thunder.impl.lightningmaps.TimedStrike; + +public class TimeMaster { + private TimeConfig config; + private Mapper mapper; + + public TimeMaster(TimeConfig config, Mapper mapper) { + this.config = config; + this.mapper = mapper; + } + + /** + * initializes, tests and starts + * @throws UserException config issue + */ + public void init() throws UserException { + if (!config.enabled) + return; + + // TODO start task, actually create that task, account for data from weather like sunrise sunset timezone + DebugLogger.info("time loaded", 1); + } +} diff --git a/src/main/java/eu/m724/realweather/weather/WeatherConfig.java b/src/main/java/eu/m724/realweather/weather/WeatherConfig.java new file mode 100644 index 0000000..ea82d53 --- /dev/null +++ b/src/main/java/eu/m724/realweather/weather/WeatherConfig.java @@ -0,0 +1,29 @@ +package eu.m724.realweather.weather; + +import org.bukkit.configuration.ConfigurationSection; + +public class WeatherConfig { + public boolean enabled; + + public String provider; + public String apiKey; + + // state is per player + public boolean dynamic; + // prevent other stuff from changing weather + public boolean lock; + + public static WeatherConfig fromConfiguration(ConfigurationSection configuration) { + WeatherConfig weatherConfig = new WeatherConfig(); + + weatherConfig.enabled = configuration.getBoolean("enabled"); + + weatherConfig.provider = configuration.getString("provider"); + weatherConfig.apiKey = configuration.getString("apiKey"); + + weatherConfig.dynamic = configuration.getBoolean("dynamic"); + weatherConfig.lock = configuration.getBoolean("lock"); + + return weatherConfig; + } +} diff --git a/src/main/java/eu/m724/realweather/weather/WeatherMaster.java b/src/main/java/eu/m724/realweather/weather/WeatherMaster.java new file mode 100644 index 0000000..99251dc --- /dev/null +++ b/src/main/java/eu/m724/realweather/weather/WeatherMaster.java @@ -0,0 +1,48 @@ +package eu.m724.realweather.weather; + +import eu.m724.realweather.DebugLogger; +import eu.m724.realweather.mapper.Mapper; +import eu.m724.realweather.object.UserException; +import eu.m724.wtapi.provider.WeatherProvider; +import eu.m724.wtapi.provider.exception.ProviderException; +import eu.m724.wtapi.provider.impl.openweathermap.OpenWeatherMapProvider; + +public class WeatherMaster { + private WeatherConfig config; + private Mapper mapper; + private WeatherProvider provider; + + public WeatherMaster(WeatherConfig config, Mapper mapper) { + this.config = config; + this.mapper = mapper; + } + + /** + * initializes, tests and starts + * @throws UserException config issue + * @throws ProviderException if provider initialization failed + */ + public void init() throws UserException, ProviderException { + if (!config.enabled) + return; + + provider = createProvider(); + + if (provider == null) + throw new UserException("Invalid provider: " + config.provider); + + provider.init(); + + // TODO start task + DebugLogger.info("weather loaded", 1); + } + + private WeatherProvider createProvider() { + switch (config.provider) { + case "openweathermap": + return new OpenWeatherMapProvider(config.apiKey); + } + + return null; + } +} diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml new file mode 100644 index 0000000..f6e8b69 --- /dev/null +++ b/src/main/resources/config.yml @@ -0,0 +1,17 @@ +############################ +### GENERAL SETTINGS ### +############################ + +# Master switch +enabled: true + +updater: + # notify players about plugin updates + # revelant permission node: realweather.update.notify + notify: true + +# 0 - no debug +# 1 - debug loading modules +# 2 - also debug processing conditions +# 3 - also log tasks running, this will spam +debug: 0 \ No newline at end of file diff --git a/src/main/resources/map.yml b/src/main/resources/map.yml new file mode 100644 index 0000000..03f61ef --- /dev/null +++ b/src/main/resources/map.yml @@ -0,0 +1,24 @@ +############################ +### MAP SETTINGS ### +############################ + +# true if the list below is a blacklist, false otherwise +worldBlacklist: true +worlds: +- disabled_world +- something + +dimensions: + # blocks per 1 deg, can't be decimal + # the default (111000) assumes 1 block = 1 meter + latitude: 111000 + longitude: 111000 + + # if you want the globe to cover the whole world use: + # latitude: 333333 + # longitude: 166666 + +# if you use `static` mode +point: + latitude: 0 + longitude: 0 \ No newline at end of file diff --git a/src/main/resources/modules/thunder.yml b/src/main/resources/modules/thunder.yml new file mode 100644 index 0000000..20c3e4b --- /dev/null +++ b/src/main/resources/modules/thunder.yml @@ -0,0 +1,12 @@ +############################ +### THUNDER SETTINGS ### +############################ + +enabled: false + +# currently only lightningmaps +provider: lightningmaps + +# how often should we poll for updates and spawn lightning +# note that this runs synchronously so increase if lag +refresh: 50 # millis diff --git a/src/main/resources/modules/time.yml b/src/main/resources/modules/time.yml new file mode 100644 index 0000000..b95c34e --- /dev/null +++ b/src/main/resources/modules/time.yml @@ -0,0 +1,17 @@ +############################ +### TIME SETTINGS ### +############################ + +# warning: this removes sleep +enabled: false + +# How this plugin affects your world: +# - static (false): time is the same across the world +# - dynamic (true): static + local time for each player, however it's only cosmetical so it will not match mobs spawning etc +# settings for both are in map.yml +dynamic: true + +# x day cycles in 1 irl day cycle +# time will no longer be in sync +# can be decimal +modifier: 1.0 \ No newline at end of file diff --git a/src/main/resources/modules/weather.yml b/src/main/resources/modules/weather.yml new file mode 100644 index 0000000..18969d6 --- /dev/null +++ b/src/main/resources/modules/weather.yml @@ -0,0 +1,19 @@ +############################ +### WEATHER SETTINGS ### +############################ + +enabled: false + +# Currently only OpenWeatherMap +provider: openweathermap +# put your OpenWeatherMap api key +apiKey: REPLACE ME + +# How this plugin affects your world: +# - static (false): weather is the same across the world +# - dynamic (true): weather is per player, however it's only cosmetical so it will not match mobs spawning etc +# settings for both are in map.yml +dynamic: true + +# prevent the game, players or other plugins from changing the weather +lock: true \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..d0f3bb5 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,43 @@ +name: RealWeather +version: ${project.version} + +author: Minecon724 +website: https://www.spigotmc.org/resources/101599 + +api-version: 1.20 +load: STARTUP +main: eu.m724.realweather.RealWeatherPlugin + +commands: + realweather: + description: AIO RealWeather command + aliases: rw + permission: realweather.command + permission-message: You do not have permission to use this command. + # usage is processed in code + geo: + description: Convert lat,lon to x,y,z and vice versa + permission: realweather.geo + permission-message: You do not have permission to use this command. + # usage is processed in code + +permissions: + realweather.command: + description: Allows /realweather (individual nodes are still necessary for subcommands) + realweather.command.status: + description: /realweather status + + realweather.command.*: + description: All /realweather commands + children: + realweather.command: true + realweather.command.status: true + + realweather.geo: + description: Allows /geo + default: true + realweather.geo.tp: + description: Allows teleportation using /geo + + realweather.update.notify: + description: Receive notifications for RealWeather updates \ No newline at end of file diff --git a/target/classes/META-INF/maven/eu.m724/realweather/pom.properties b/target/classes/META-INF/maven/eu.m724/realweather/pom.properties index e825c42..1c65891 100644 --- a/target/classes/META-INF/maven/eu.m724/realweather/pom.properties +++ b/target/classes/META-INF/maven/eu.m724/realweather/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Sat Jun 01 13:23:15 CEST 2024 +#Sat Jun 01 19:33:58 CEST 2024 artifactId=realweather groupId=eu.m724 m2e.projectLocation=/home/user/eclipse-workspace/realweather diff --git a/target/classes/META-INF/maven/eu.m724/realweather/pom.xml b/target/classes/META-INF/maven/eu.m724/realweather/pom.xml index 46ffdff..c5030e3 100644 --- a/target/classes/META-INF/maven/eu.m724/realweather/pom.xml +++ b/target/classes/META-INF/maven/eu.m724/realweather/pom.xml @@ -1,6 +1,69 @@ - 4.0.0 - eu.m724 - realweather - 0.9-SNAPSHOT + 4.0.0 + eu.m724 + realweather + 0.9-SNAPSHOT + + + 17 + 17 + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + 724rocks + https://git.724.rocks/api/packages/Minecon724/maven + + + + + + org.spigotmc + spigot-api + 1.20.6-R0.1-SNAPSHOT + provided + + + eu.m724 + wtapi + 0.2 + + + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + package + + shade + + + true + + + eu.m724:wtapi + + + + + + + + + \ No newline at end of file diff --git a/target/classes/config.yml b/target/classes/config.yml new file mode 100644 index 0000000..f6e8b69 --- /dev/null +++ b/target/classes/config.yml @@ -0,0 +1,17 @@ +############################ +### GENERAL SETTINGS ### +############################ + +# Master switch +enabled: true + +updater: + # notify players about plugin updates + # revelant permission node: realweather.update.notify + notify: true + +# 0 - no debug +# 1 - debug loading modules +# 2 - also debug processing conditions +# 3 - also log tasks running, this will spam +debug: 0 \ No newline at end of file diff --git a/target/classes/eu/m724/realweather/DebugLogger.class b/target/classes/eu/m724/realweather/DebugLogger.class new file mode 100644 index 0000000000000000000000000000000000000000..4f02b8f6aace24d53bef57f5556319f4d244105c GIT binary patch literal 878 zcmah{%Wl&^6g`uqabnygO?Z?RXbT0BP+t#_{RerS zI#Ypwm`;nhM5vUJGbAiUw_(++kW8FdWl7FlTX=EYx#f@2FS#Y3^$Z z&de3_SF53=onq9|cJr+Bg{$WG0&g}?!EqC25)WjFI8`b>@))^P7PY%;#5 literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/RealWeatherPlugin.class b/target/classes/eu/m724/realweather/RealWeatherPlugin.class new file mode 100644 index 0000000000000000000000000000000000000000..70ea509ea3cef39abf660054f42cdd9fd4a53645 GIT binary patch literal 5484 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 literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/mapper/Mapper.class b/target/classes/eu/m724/realweather/mapper/Mapper.class new file mode 100644 index 0000000000000000000000000000000000000000..fda6ee707ab16b0b6db82684749890528b13d3b8 GIT binary patch literal 2242 zcma)6ZBrXn7(F*Hge1#5RRl_bBF$U73TVYpv?ZdnfmT5%_|_%ah9#R_CTxoOu`^D8 zga5$~I)gH`GyVX7ljC^q-Mp1jfegv+z0W=8Jm-1t^Y_1h{smwTl?Va?6J|}X+?<)y ztEOQenTEG#R`rT;aKN8c^%Frzpm*PRV(7Nvl=S<%`)0ut=qR|(W2+>P%%6*~q(ZYi zbmUg;;voU^3bE!{ww|{RJ?=%MObGYWxz4PkT$^yDqaT&q=f&FY4+Yg18w-YppR zrct%zdwntF?O9Cb>iOgpd&wq(XSvRXyX3mnqQzuQo}N#%CnsrSP_||3k!KuOx~qKG z+m2>q7{+J>BLV|$_B0SQT*er4Et%eq$}ktjI3^>Q5V&^1l4-b#DS@s-=5FRG%&Qe? zhFFo*(;BWd7#>ROq=u9X@Aku8r=;Q|$Ow!#7+;r73~Ahu<bj;dL4pD?l5x?8Ij%wFvb zpz*tlE6XYph^0=@ol5_XzTZ^b0KdBxQa3{A;ptusa_tSqGa8rpB>!THg?Zym4An7z zAg^RjrvJcON2z1<9plO~cZIKS`)`S7?tJJ4(%Xrl&p%HRN6lmjFj#26_gWr_j_ z)}&109lT4b9^NBfES?-=LcCav6L=5r*Jb=f(Gi|ZXO3~RDWiOsuk#HV<@xXn3~#5C z-9zCMWKRnjCdmllFDoH)%$0CWA!#h)Ba+Frk8ztqdN7JR6cXf_E-djW%>5ibsY{yS zuZ-{X`IlRK9cq12@yOaRrp_avvC8O|RpGiIYDKGTjCeZi-#QeIAk}e@Zaf zA{k%AgY0jEvpTxs8}~7r ze3`mABj`gBkH~2fgK7SQluYk2N_9Os?#ZUo>V$hFY&Bs_?aitRw;E7u@@RD)fif`y Gu>S)bbL-sz literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/mapper/MapperConfig.class b/target/classes/eu/m724/realweather/mapper/MapperConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..6241165149943a85d73369d46453d31282a64691 GIT binary patch literal 1434 zcmb7EZBNr+6g|&itc)Tsz!yYCK-q>;#TV2eDok`*K!YKHn3%FX&PTeIbgld?{Xhs3 z{Q>?c<9WJbP)XD;y>Gqu+?UgS`~LYWfSY)cK}ujkMpk2H`lb~~$K8=m_)Z2^!`a@Z zSc=7h@4Z#^4B7>H-#Z^1%XPfEwX*qMRzrb|^qfss)&#_cz=<6{aBK6fQ{8e^li`lo z(PXL}=SHD&Et{c|K<-KAdeQbhee{$1Ph6z8};Sfn}2wJ7$%q!a0Gqd|^$XeZjBEEZQ(= zq7ONN9$R^GIcjXm;FTU!AZPn*V$BJZwi9Q2_)c-k!cWM*tdq!nZv(&4T5c3@BHt6( z$lHEUw>G1#EfreTc=Jh+ed{|U)+(3JjMBdYW+5?&QPR~c z69zgBTo>rCsfP5LTtsuqO-P|JZkXivEgqK`6-|X>8?ESSGbT)Q8@MYlaJ1SXo%A~; z6DQD}!F_>|zfsD-15z?(;4dvbGBJ+@lAbM<{U~PAv0ar7JSOdu3WsfEF^eafl1~NF z`Et3irW<=^q6fX)318 zC(-Xs9$77uW;)g+$7X0CyCEHP8hy&TtF`2ku1Ub_GQ literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/mapper/MapperEventHandler.class b/target/classes/eu/m724/realweather/mapper/MapperEventHandler.class new file mode 100644 index 0000000000000000000000000000000000000000..95a842a518b5dcf104e0da388e480443ebbcf74e GIT binary patch literal 1228 zcma)*U2oGc6oy~7rCGCNWo26_U!#nTeryYjNn8{mA=t!41`;2g#GTt(UAEMj(q#Qz zNKhm$_yPPV#Bmx*x}tU$v2~ntp7;2*{p!s{+qv;z%UhLY!ZtyXw;<^+~dC6?{< z10jXakR1UTHte}_4N8CRNGEu~uvNK2eznPvdF6G4jx@xE7fKW)T;pv3k-SN zk>YLGYYG1&Z@Ge@V0&%uHo5PpI9|*ICr+QinlGDlg<4+pXh+%5%@lzy=;Nw9%)rR@M@hBOJsJGZ83r@9 z^pjL*hV2RJROu+~udO<2%9uI{&N3!Zr1rdHU>6phW*BMC+72DugmE+bVbDK#q2CsV zj=Flq>4&we-W1AoW7G6qqc5c{ESKh zD+BciOcW?u8)f4LRw$ynh)PF+)#zW5*0L1cq*?I~V!m1XihO;D(h%#%|0MJXw@dAO|aAZ3wlzSQfI>s9@zBCTima;i^lWz?#yUcB_7if8oKHc<=-K z75~9FR--Xqyv*!-`{upbeR+F&2GGT-4U5p`)Sd5acios(aKp;XICi7SCHux5B^>YH z`g~<{6xzrU8kg!?xq%9&?)L?uCOWNxF~^ArM~8a^IwDjCQJ5GNnz0H}&Y#uI!`=Do zF`=-lLv8wmX50HQ9GX~%)859IkQ+o7>|g;)WjH7is-6z{B%MzB~nSS z;4d;~W;!8sy#GF`N3iFdBx;&j{#l0L45Kvm`9No(zkX!vLymQjEDEV>$fF?L7G$9) xCmBacYFU`RaF+B!XY&!2`%F`n>SSzDW*1Qt-1<~u8FfLTM*}OFS5uIM);s0#Yuf+- literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/thunder/ThunderConfig.class b/target/classes/eu/m724/realweather/thunder/ThunderConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..4809d6afa652036768b3815144b8791a13f11e8c GIT binary patch literal 977 zcmb7C%We}v5UlZQ*Up9{CUJO^@GyQPUI>vm1aTk|k|hfcjv^6pS=;0FB=#>lHR8LQLRd-MS{`2D(fPK8QkP)cM*qyxE+jq6}#$Titjih#? zQ5+12M=2hL!BF`YassQT-i7Cmy})-r^iE|z60l_8^~Q1_AWj7A&pNzNOcp42{sng< ztpfjm(OM3*JRdQ-El_x^0u{Xx$kyt|0=dI*AWO(%#laFBft8L56*szS; zBL|Q1M4-sr^eY6a*QH)%Gh9^%7Hk_u!&P_CK$Cw*u6Do$xVDD2$=h{ML`h(IZju7- zf>S2LY$elA;1IfDto!nvN_JvyPg`c|uub_a_dHAF9B6U(U?<3$h#7jgWIUI7bBThO zZ(QQWx8!-1XCZM~Sfg!18Gtfw5{p>J20bQOQzk=f{e<{-IXl|#dT|sbk3fAug`hT z`yT!6Ki~cdz&?DTp+%rahDPz4RoEJgg!`#hHET8L3Ea?BEq-f^L_!pAt9kCU#h?Uk zT2wd}m^JJ2Xip@9%16x(OO_+BDernEV=}B%tiXsDjT6y3N_8aZj+uUifGk>H0TCri zP0bHHt0H}YYw{5=VPM(D5zjMc@|GV^qJ7jVIc5-gQedQ+%%Meh%agIHHQTVQQaNxe zr$jV-W6Y|`;%MZte?Vn-$a1V;K%kOcG_pd>3Gz)vm!o}UuzJP?(t~bMW{|=L9qVwN zKq}iau3?kFx+WN8un`;DA+SZqT6C(}HXT1etD0@sp`lI9ZqU&IU0`kAa^&%_Iw`#| zbJ8YiU3s@)+T*5Yspn)d9h5DizADDW>?K}l1(!hPu15;87Fe$1Yv>ioHe;=JL66Dc{vb_U$^_ka?(Z2_=^j-M2G!~_z@YbPPfDC z_B6BfJ>4X<$i$G2Vcg5Q5V)~tf%U|oiMt#QXK)-RG~6e!Yx(wFR_N*=>B!=`E>_70 zbc|w51zJ#?5g1<8QA;S7gcB8osn97X&KcZaKdefRSscf>j#KzCk@RGV1w(rA@xI4& zinc0s-3cyNFrm)fX%@tKQY)N(Rk1Rdz(Z>9ej;%H|B}cmYKGc(froWmg*A!+rjAJz z$Y4)SdD1VF!9&Ww)G-A%3*8GH6_YAzO!RQ}%0*{*xTo=@Unt9BNO+8+Q9X}paT_e2 ziex*xZPzTyVg?mdHQ1~;%>X(kC&NXTs0b) zg$lb=RG2dG5NKd!YUqUseS)Dw{)Xc!V~Vm3d|3Q61;;7-=WZhNi9B zOJhiN_op>HAuv$SZTYcp(m(R`Zo+W=I@L3H92*#yZB{3X=1vx=T}#Y}O(wN)&~?3{ z#bzdbrmo=`fqkp?-O#%-xQJ&p{9-vsGh}~N$8-3lz}1D&^Q03fr4h@vRjFr_8CECe zc^xlAK$c{1Oxos522bN9Me3IYZp;oZQgwycRZsf0j#m}LDYMA>!#fO&@tR5AX9{Qe9dS_adDpFkwf+X8#?)(ES*AEPQW;!$i@KpiBRgg^@}3fnEOZ>9ZZ*`pI$G;O zn)7v7&+luva-P=G9Jl4>acyn^8z<&*{VX=;dS|gUw|f@dxjnPk@l~X}li!;nr`J}|4maW^KGAR#rif-L(3WVXLQF9Pb}_E>a7`tY!|o`kfAC3Z zJeK|7RsMhY>a8 zzQz5(98NO1iHRJSy65rWEPl$F`s`@u7oGg<;v9;ny2|O)ACdY7XH>>1sEqgW;s<7v zVYD5LaUG-FggrRGCUO`zBad705N|zaxpE%2M=0oV{0Ry*>Zj4tv70&ac9cN>D4!G> z`{MwPOyuWq_6siXFUybU`^!H~j_Z57&dp)w5?Vh;#{wSb4n6s$_>ynp_||X)4l$|$ z{%AVV;D3LEf8zabbZhWB{spbGMNv12<0J{B;@HACHZS1miEr?8P6^f7L)ZZT literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/thunder/ThunderTask.class b/target/classes/eu/m724/realweather/thunder/ThunderTask.class new file mode 100644 index 0000000000000000000000000000000000000000..ac8997c909422dc0f8a837dd98de985f23b35f2d GIT binary patch literal 3537 zcmbVO`F9&v8NE-kJ+?BA9i`c5nkb1wyhf#j2C7ns?KBaUZBnaF)dFQKJxddfX2dKu zF3{2dZQ1vwKv@fAhZe^qJqHfI!r{N*&*(Y8eKWE(vPDkdSjY30Z@b@j-}m0%|MkXS z0Gz|7hJ?Tw8Dtyh?>m=urD3f}!>>s<>(>Ii!f!G977eeip-149<5siFLA`GJS+87^ zmB6CZbhz+nVB5yBB?Sgs>T`zYOIKi`a0fmj;haEU!)P{@+NrK;(QbAw6jI_3nzrdb zByeT4tNacqEjL|7J57%*3G~c36`4X3gE|JVS0Fh$wln~NVI95bQ=_yF4gCT`1=E)E zL1S6E#V8Hwf>SoECBrqN|b~U@Od`*`96z;)s4aWqIcT4@OTn?%Qr&^V+jtou^sA;b_3~RK|Hnr%x zbdbwG8C#3Y=Ts6-;k1Sk>U8t414)#19dE@M0nMY~x?~m(M3w{Jw6Ygm*H|x@o}Wu$ z3=9YdSl3Kvgu7*Ryc;BTzh(HQA5?g<#B2)h#k7VC9YvpY0y0d; z3}%_$Rl^G8!ivhyY&<)WR2aa+IxZ>G1D0b~L)$6j@rZ`^37pspE8Y+~j)sl`=BUgP zTyi2_7>N#;l_bi$x;u=8Xmue%BW3!q%sbF#A;sHkumP&GyF(Y(=5tBdTJG zyVI6au0NiFhd=|lxv$;&^0qI-<~V~@frFi0rnMP5`lyce4tpi#{$n~m-m&_GLiLP} zXYoma6n)R|Vy$1GQ+C`gQFdl96ef4CGvP{?b#^3x%S#Y^F*_?d=Rc$2irXxghzU1kem z6QH26Vw8QyUDxq*yvkHH+Diieh~MBX&B*v=!>(A;8!0$WJ!s})*JkVB#8x^KRY~LG zcfJ|9yuEJxhH6=!F)VA*^kr_S4?j`YSS+&b2gopfnd0;7H#(lehle!$Iuwl2a;wb^ z<97mj-nOMXV;P<&Jq@o5oZgk-ZfVl6LEhe8lr2BXDW6h2dA#-#{NwX59Px3;Z<0F$ zPyz4Zti*jKH#Ghy=;ISNIGDVFeXoTI`}seO9<|N?!&KXcy)bTNhlB}L*xgE z`VaO&IfO*{g-IPu@aRfN@W4qHz=MVyTy-wQ$tO(bH-~Ad^$K@QDNwJSXrH z&QGcN3kkfiiO)|?y^b&6!Z(w+ntrL3lDOH>7)`XX9%HJ3W5jtJ58(vnh`z)pas?xJ z4rgM;yS`n#>-ZkNPwa#6@iKnEtSQ935N}c?i63&3z>n}_esx0s1=oIs-{SZ916LH4 LUc(=814sS?=V;^^ literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/time/TimeConfig.class b/target/classes/eu/m724/realweather/time/TimeConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..c65f5c7c73a014785816e5b8a56ee8d958c123ad GIT binary patch literal 872 zcmb7CO>Yx15Pg%c-K5(j4J3R+OKHhR8%wAXhae6#;Makq;S&`^S zi6cG^O+3{z4>>~hOn#PPF5{W_I670~gy5-Ij^=7Ypc6)uud$5unBYfdqNiF}zUUJQ zZ*;7aw}fo7H6-K?%|w-uML9qTYlKRuWA!18M#>(!dW2eN#&SNCRy({3=8{wWiLevi zKyi<-F|{UI>QAjqw22ABW@zk8jMDRSorv+Gxz(k(_H@AgaYnCoBeD_*Wgq!9+{Z%? z4+#6Wq6zQ_j|rujO5PbWSCXaHo8i^K2Z`13tk*gzGSkxlc@%tj4r~SR9Pl0YivT;= zB^0?(-=vFC{(usO#Fn787TA z{jzMi3-)+%R+iN;&Txd+g3o}FU`uTC?F+1bUtCxCEG&blvLCGc4b&JFaR+xf;*u@X zWY~6pfsQXw4?FEz;}Z8W_<<+vKU?{m>_5N6wu`^)eB+D^97}^G0%aakm21|p$+h=T YU$8comC-_*-}u-?hhI3cdyD-2e<|+CM*si- literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/time/TimeMaster.class b/target/classes/eu/m724/realweather/time/TimeMaster.class new file mode 100644 index 0000000000000000000000000000000000000000..d2123601b7ceb29fec3c57ef90d4bb8703f8b3fd GIT binary patch literal 928 zcmah{+iuf95It*~x^dhFQfRrfG@%rnw89dq#6u7-1tf$E4{0L-Pa9|Jx;S>Uae!~( zFDkVHRe}%TqY$%es{tvZvNWFAJu_$a%>4R&{u96swrv;;8)D)QpFH02rQpeD!Sf>_ z{X8BDf1k`AALl~auo$i$^H1DQcpCX{`^O^88Ro()J&YrU&EUUPb~UU+2}3>_2}!Io z6N+1ZPlFWvX`IISGltjRO#DTgCBaP4zeQU;25UDP2nQw>TvV{gV0x`y1@uH0S1_l% zx(gfg47DIm#hb~nFXTS&CxUK*EaXX#%UH$bp_L!S<4a{I#H4pw>RAlVi!Y%V<#Cpd zZQN$?W{H?-t^I?skQeX@R&m$H+GW!#WO1>M27@h9)$xFVy`RTDhN_aUkz{-z1`h7y zfsIXu^;u0k7yU^TWKkrfi-+*^6Am+mmKRLdqMOS&jXJMB{B>5WN=M1Q(9L=Hk%n7} z=5(`(48_Y>$y%Fk+apyGO`3v9duq@}L(v|MME@C$&7u1$Mepcd;cD$~aNApFz}6q%S=JQ* literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/weather/WeatherConfig.class b/target/classes/eu/m724/realweather/weather/WeatherConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..9bad6fb6280e687da01d697a7b0456376e3bfc5f GIT binary patch literal 1020 zcmb7CTTc^F5dKbYyKNVNY7s;cykIZDQLL8)!-E)JZ1kZ9Bk|>Qdnku)_mJZj!{6|i z=z}3>;t%jg8RzV-F%3T0m;Jt(Gc(`J?EL)o?FWDs9y`b|)a8f|pKP|cks|mgMRX_) z|ATK6dq;-{s_!7jFmohM1P?^m=dZg*(vKJ%8H#Qodkk!!!96zmMD?U$sI>nEcOs+0 z{uV<)9IKb|l+t>qp%^NkAs1+WKrhc!sG@C#Y^}aW-W}bOC1f$kbwf)+ZA4a05#WrM`@wYaK{I4OeRy7hc~llG3t= zJPIxxD|g$&9o%IoQf~5F7*_w4da;_Vb_(sZk^D|Y-z^X6N2q5OdYF4pKiffq1Q!L;G a7UQnw5@kHVCdIng#zTs=!?fZ$kA4GoDC^h& literal 0 HcmV?d00001 diff --git a/target/classes/eu/m724/realweather/weather/WeatherMaster.class b/target/classes/eu/m724/realweather/weather/WeatherMaster.class new file mode 100644 index 0000000000000000000000000000000000000000..dbe29458ae757fb82e5a9a8b902dd3ac70e799f5 GIT binary patch literal 1873 zcma)6ZF3V<6n<_Jv*~u}O8`+SHU+`Fly0q6kWdf`Xi7@KLTidIvrR7P;&wM~Hm!d2 zZ}boN!7t#@)UgA8bjJVSA8{PVbM_^qAv*0$bMM}JUY_%u=iER3`Sk^WS$wS^CXkaY zee=T1tnNy~+Lng5AzeLMSA*|Gqv=UkK|)~Uv9V?7mSNZRrS-?M>Io#Pj{V523lz$S zh&AsU7s+kYXf&iNaHg+YaH}u+Mr599xXzYYV~1?VVcRnrrXJnsA>6y6B`3LT+NO6! z;NDB8|0y&C*NNY4dJs@HB!d3Q{Mf|S5;*|g=I z*5UaO`#eST%v$_^Si2Sc&1}F6}&|(^=pRX z_e_7#ly1jd!P^2ek#!HHG773ktakhckilsM6Nl4KK&^%|ct=2yHdkE}5Nj&YbWX#& z$O;TqiE&RxsRZ)bT&Ed5$a(^VRMe<2uipVe7TZU!U zGLdvHWmFU}&3$}N;CQy&>s{o|X7D~InC0%hV!#1D)Nlb8Np`GSo60-iFVZW%A+#cg zxTK+o%cOVD32>8$h=e}r#xSkoDy}K`m>B$z{`Ih=;Z2OBFi%u(2eX~A9HS;{DsJKv z1-Asoqe$K2zaiIK^|Dj1OIO3EDEX>;)!}cphk8_=&M5aY(Jde!%)7ki_!e#E{;C+ z9gfp)8VSCp-w~4KD2C|dbvnreZa9HA=!-2lo$z;@Fh+aQ0j($LEJ^DaPWdT!$dc_A z^3O2(4C6aUJk3-3v%ARAQSNt4>|?C5k3uDVeh+$JHq*ujZG5zcx!>5RjVtNviTHEG zf58n#8waC3?U#Cz3LT>&PvI!WDSrkR>E