This commit is contained in:
Minecon724 2022-04-23 17:05:33 +00:00
parent 0af7e1dd7b
commit 31ce95aa76

View file

@ -29,7 +29,7 @@ public class RW extends JavaPlugin {
double pointLongitude = point.getDouble("longitude");
List<String> worlds = weatherSec.getStringList("worlds");
String choice = providerSec.getString("provider").toLowerCase();
String choice = providerSec.getString("choice").toLowerCase();
ConfigurationSection providerCfg = providerSec.getConfigurationSection(choice);
if (providerCfg == null) {
@ -40,6 +40,7 @@ public class RW extends JavaPlugin {
Provider provider = null;
if (choice == "openweathermap") {
Bukkit.getLogger().info("Using OpenWeatherMap as the weather provider");
provider = new OpenWeatherMapProvider( providerCfg.getString("apiKey") );
}
provider.init();