1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-03-15 01:20:19 +01:00

Fixing upgrade script to allow powertool upgrade.

This commit is contained in:
KHobbits 2012-02-23 14:49:23 +00:00
parent d0acabaaa0
commit 7b13aebc5a

View File

@ -271,18 +271,18 @@ public class EssentialsUpgrade
if (config.hasProperty("powertools"))
{
@SuppressWarnings("unchecked")
final Map<Integer, Object> powertools = (Map<Integer, Object>)config.getProperty("powertools");
final Map<String, Object> powertools = config.getConfigurationSection("powertools").getValues(false);
if (powertools == null)
{
continue;
}
for (Map.Entry<Integer, Object> entry : powertools.entrySet())
for (Map.Entry<String, Object> entry : powertools.entrySet())
{
if (entry.getValue() instanceof String)
{
List<String> temp = new ArrayList<String>();
temp.add((String)entry.getValue());
((Map<Integer, Object>)powertools).put(entry.getKey(), temp);
((Map<String, Object>)powertools).put(entry.getKey(), temp);
}
}
config.save();