Hotfix
This commit is contained in:
parent
8da44daa99
commit
c8bc9dbfeb
|
@ -43,19 +43,25 @@ public class AddonscriptJSON extends ASBase {
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
indexes.INSTALLERS.put("internal.dir", new InternalDirInstaller());
|
indexes.INSTALLERS.put("internal.dir", new InternalDirInstaller());
|
||||||
|
if (repositories != null) {
|
||||||
for (Repository r : repositories) {
|
for (Repository r : repositories) {
|
||||||
indexes.REPOSITORIES.put(r.id, r.getRepository());
|
indexes.REPOSITORIES.put(r.id, r.getRepository());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (index != null) {
|
||||||
for (IndexEntry e : index) {
|
for (IndexEntry e : index) {
|
||||||
if (e.type != null && e.type.equals("addon"))
|
if (e.type != null && e.type.equals("addon"))
|
||||||
indexes.ADDONS.put(e.id, Utils.getFromURL(e.link));
|
indexes.ADDONS.put(e.id, Utils.getFromURL(e.link));
|
||||||
else if (e.type != null && e.type.equals("version"))
|
else if (e.type != null && e.type.equals("version"))
|
||||||
indexes.VERSIONS.put(e.versionid, Utils.getFromURL(e.link).getDefaultVersion());
|
indexes.VERSIONS.put(e.versionid, Utils.getFromURL(e.link).getDefaultVersion());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (versions != null) {
|
||||||
for (Version v : versions) {
|
for (Version v : versions) {
|
||||||
if (!indexes.VERSIONS.containsKey(v.versionid))
|
if (!indexes.VERSIONS.containsKey(v.versionid))
|
||||||
indexes.VERSIONS.put(v.versionid, v);
|
indexes.VERSIONS.put(v.versionid, v);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue