Skip to content

Commit 5330ac6

Browse files
Fix build
1 parent 7ce14da commit 5330ac6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Update.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.maxgamer.quickshop.api.command.CommandHandler;
2929
import org.maxgamer.quickshop.util.MsgUtil;
3030
import org.maxgamer.quickshop.util.updater.QuickUpdater;
31+
import org.maxgamer.quickshop.util.updater.VersionType;
3132

3233
import java.util.logging.Level;
3334

@@ -46,7 +47,8 @@ public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabe
4647
return;
4748
}
4849
QuickUpdater updater = plugin.getUpdateWatcher().getUpdater();
49-
if (updater.isLatest()) {
50+
VersionType versionType = updater.getCurrentRunning();
51+
if (updater.isLatest(versionType)) {
5052
MsgUtil.sendDirectMessage(sender, ChatColor.GREEN + "You're running the latest version!");
5153
return;
5254
}
@@ -58,7 +60,7 @@ public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabe
5860
}
5961
MsgUtil.sendDirectMessage(sender, ChatColor.YELLOW + "Downloading update! This may take a while...");
6062
try {
61-
updater.installUpdate();
63+
updater.install(updater.update(versionType));
6264
} catch (Exception e) {
6365
MsgUtil.sendDirectMessage(sender, ChatColor.RED + "Update failed! Please check your console for more information.");
6466
plugin.getSentryErrorReporter().ignoreThrow();

0 commit comments

Comments
 (0)