Fixes error and more info for auto update
This commit is contained in:
parent
e7b2fa374b
commit
535946d95d
@ -72,7 +72,7 @@ public class LDUpdate implements LDCommand {
|
||||
|
||||
if (sender instanceof Player) {
|
||||
Bukkit.getConsoleSender().sendMessage(LibsMsg.UPDATE_SUCCESS.get());
|
||||
sender.sendMessage(LibsMsg.UPDATE_INFO
|
||||
Bukkit.getConsoleSender().sendMessage(LibsMsg.UPDATE_INFO
|
||||
.get(result.getVersion(), result.getBuildNumber(), result.getParsedBuildDate().toString(),
|
||||
result.getSize() / 1024));
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||
import me.libraryaddict.disguise.utilities.UpdateChecker;
|
||||
import me.libraryaddict.disguise.utilities.modded.ModdedEntity;
|
||||
import me.libraryaddict.disguise.utilities.modded.ModdedManager;
|
||||
import me.libraryaddict.disguise.utilities.plugin.PluginInformation;
|
||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||
import org.apache.commons.lang.math.RandomUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -145,8 +146,11 @@ public class DisguiseListener implements Listener {
|
||||
latestVersion = "" + updateChecker.getLatestSnapshot();
|
||||
|
||||
if (autoUpdate && plugin.isNumberedBuild()) {
|
||||
boolean result = updateChecker.grabSnapshotBuild();
|
||||
updateMessage = result ? LibsMsg.UPDATE_SUCCESS : LibsMsg.UPDATE_FAILED;
|
||||
PluginInformation result = updateChecker.grabSnapshotBuild();
|
||||
updateMessage = result != null ? LibsMsg.UPDATE_SUCCESS : LibsMsg.UPDATE_FAILED;
|
||||
Bukkit.getConsoleSender().sendMessage(LibsMsg.UPDATE_INFO
|
||||
.get(result.getVersion(), result.getBuildNumber(),
|
||||
result.getParsedBuildDate().toString(), result.getSize() / 1024));
|
||||
} else {
|
||||
currentVersion = plugin.getBuildNo();
|
||||
updateMessage = LibsMsg.UPDATE_READY_SNAPSHOT;
|
||||
|
Loading…
Reference in New Issue
Block a user