Update purpur build location

This commit is contained in:
ME1312 2021-12-06 03:41:26 -05:00
parent 6d457200fe
commit 9999cbe39e
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
2 changed files with 17 additions and 2 deletions

View File

@ -381,6 +381,21 @@ public class SubServer extends Server {
return raw.getString("template");
}
/**
* Grabs the Template this Server was created from
*
* @param callback The Template
*/
public void getTemplate(Consumer<SubCreator.ServerTemplate> callback) {
Util.nullpo(callback);
String name = getTemplate();
if (name == null) {
callback.accept(null);
} else getHost(host -> {
callback.accept(host.getCreator().getTemplate(name));
});
}
/**
* Is this Server Available?
*

View File

@ -29,7 +29,7 @@ if [[ -f "Purpur.jar" ]]; then
fi
mv Purpur.jar Purpur.old.jar.x
fi
__DL Purpur.jar "https://api.pl3x.net/v2/purpur/$version/latest/download"; __RETURN=$?
__DL Purpur.jar "https://api.purpurmc.org/v2/purpur/$version/latest/download"; __RETURN=$?
if [[ $__RETURN -eq 0 ]]; then
if [[ $(stat -c%s "Purpur.jar") -ge 1000000 ]]; then
echo Cleaning Up...
@ -44,7 +44,7 @@ if [[ $__RETURN -eq 0 ]]; then
exit 4
fi
else
echo ERROR: Failed downloading Purpur. Is Pl3x.net down?
echo ERROR: Failed downloading Purpur. Is PurpurMC.org down?
__Restore
rm -Rf "$0"
exit 3