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