mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Fix auto updating.
This commit is contained in:
parent
d0605b9b55
commit
75f189aae8
@ -1437,7 +1437,7 @@ public class PS {
|
|||||||
PS.debug("&7PlotSquared is already up to date!");
|
PS.debug("&7PlotSquared is already up to date!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
dl = dl.replaceAll("${PLATFORM}", getPlatform());
|
dl = dl.replaceAll(Pattern.quote("${PLATFORM}"), getPlatform());
|
||||||
log("&6PlotSquared v" + line + " is available:");
|
log("&6PlotSquared v" + line + " is available:");
|
||||||
log("&8 - &3Use: &7/plot update");
|
log("&8 - &3Use: &7/plot update");
|
||||||
log("&8 - &3Or: &7" + dl);
|
log("&8 - &3Or: &7" + dl);
|
||||||
@ -1455,7 +1455,8 @@ public class PS {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
File newJar = new File("plugins/update/PlotSquared.jar");
|
String name = FILE.getName();
|
||||||
|
File newJar = new File("plugins/update/" + name);
|
||||||
MainUtil.sendMessage(sender, "$1Downloading from provided URL: &7" + url);
|
MainUtil.sendMessage(sender, "$1Downloading from provided URL: &7" + url);
|
||||||
MainUtil.sendMessage(sender, "$2 - User-Agent: " + "Mozilla/4.0");
|
MainUtil.sendMessage(sender, "$2 - User-Agent: " + "Mozilla/4.0");
|
||||||
URLConnection con = url.openConnection();
|
URLConnection con = url.openConnection();
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user