mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-25 18:48:24 +01:00
Fixing upgrade script to allow powertool upgrade.
This commit is contained in:
parent
e5b91dae73
commit
9f605e9a88
@ -271,18 +271,18 @@ public class EssentialsUpgrade
|
|||||||
if (config.hasProperty("powertools"))
|
if (config.hasProperty("powertools"))
|
||||||
{
|
{
|
||||||
@SuppressWarnings("unchecked")
|
@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)
|
if (powertools == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (Map.Entry<Integer, Object> entry : powertools.entrySet())
|
for (Map.Entry<String, Object> entry : powertools.entrySet())
|
||||||
{
|
{
|
||||||
if (entry.getValue() instanceof String)
|
if (entry.getValue() instanceof String)
|
||||||
{
|
{
|
||||||
List<String> temp = new ArrayList<String>();
|
List<String> temp = new ArrayList<String>();
|
||||||
temp.add((String)entry.getValue());
|
temp.add((String)entry.getValue());
|
||||||
((Map<Integer, Object>)powertools).put(entry.getKey(), temp);
|
((Map<String, Object>)powertools).put(entry.getKey(), temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.save();
|
config.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user