mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
remove argument-less updateJar
This commit is contained in:
parent
a43072cd1d
commit
6e149d07c6
@ -135,21 +135,9 @@ public class UpdateChecker extends PlexBase
|
||||
}
|
||||
}
|
||||
|
||||
public void updateJar()
|
||||
private void sendMini(CommandSender sender, String message)
|
||||
{
|
||||
updateJar(null);
|
||||
}
|
||||
|
||||
private void sendOrLog(CommandSender sender, String message)
|
||||
{
|
||||
if (sender == null)
|
||||
{
|
||||
PlexLog.log(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.sendMessage(MiniMessage.miniMessage().deserialize(message));
|
||||
}
|
||||
sender.sendMessage(MiniMessage.miniMessage().deserialize(message));
|
||||
}
|
||||
|
||||
public void updateJar(CommandSender sender)
|
||||
@ -162,7 +150,7 @@ public class UpdateChecker extends PlexBase
|
||||
JSONObject object = new JSONObject(EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8));
|
||||
JSONObject artifact = object.getJSONArray("artifacts").getJSONObject(0);
|
||||
String name = artifact.getString("fileName");
|
||||
sendOrLog(sender, "Downloading latest Plex jar file: " + name);
|
||||
sendMini(sender, "Downloading latest Plex jar file: " + name);
|
||||
CompletableFuture.runAsync(() ->
|
||||
{
|
||||
try
|
||||
@ -171,7 +159,7 @@ public class UpdateChecker extends PlexBase
|
||||
new URL(DOWNLOAD_PAGE + "job/master/lastSuccessfulBuild/artifact/build/libs/" + name),
|
||||
new File(Bukkit.getUpdateFolderFile(), name)
|
||||
);
|
||||
sendOrLog(sender, "Saved new jar. Please restart your server.");
|
||||
sendMini(sender, "Saved new jar. Please restart your server.");
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user