Prevent exception while adding variables to gamemodes

This commit is contained in:
xXVevzZXx 2016-04-27 17:50:01 +02:00
parent aa219ec3e5
commit 1b5b18c9b2

View File

@ -307,10 +307,19 @@ public class Arcade extends JavaPlugin
config.GameModeMods.put(mode, new HashMap<>());
for(String varSet : mods.split(";"))
if(mods.contains(";"))
{
String var = varSet.split("=")[0];
String value = varSet.split("=")[1];
for(String varSet : mods.split(";"))
{
String var = varSet.split("=")[0];
String value = varSet.split("=")[1];
config.GameModeMods.get(mode).put(var, value);
}
}
else
{
String var = mods.split("=")[0];
String value = mods.split("=")[1];
config.GameModeMods.get(mode).put(var, value);
}
}