Prevent exception while adding variables to gamemodes
This commit is contained in:
parent
aa219ec3e5
commit
1b5b18c9b2
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user