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) {
|
if (sender instanceof Player) {
|
||||||
Bukkit.getConsoleSender().sendMessage(LibsMsg.UPDATE_SUCCESS.get());
|
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(),
|
.get(result.getVersion(), result.getBuildNumber(), result.getParsedBuildDate().toString(),
|
||||||
result.getSize() / 1024));
|
result.getSize() / 1024));
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import me.libraryaddict.disguise.utilities.LibsPremium;
|
|||||||
import me.libraryaddict.disguise.utilities.UpdateChecker;
|
import me.libraryaddict.disguise.utilities.UpdateChecker;
|
||||||
import me.libraryaddict.disguise.utilities.modded.ModdedEntity;
|
import me.libraryaddict.disguise.utilities.modded.ModdedEntity;
|
||||||
import me.libraryaddict.disguise.utilities.modded.ModdedManager;
|
import me.libraryaddict.disguise.utilities.modded.ModdedManager;
|
||||||
|
import me.libraryaddict.disguise.utilities.plugin.PluginInformation;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import org.apache.commons.lang.math.RandomUtils;
|
import org.apache.commons.lang.math.RandomUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -145,8 +146,11 @@ public class DisguiseListener implements Listener {
|
|||||||
latestVersion = "" + updateChecker.getLatestSnapshot();
|
latestVersion = "" + updateChecker.getLatestSnapshot();
|
||||||
|
|
||||||
if (autoUpdate && plugin.isNumberedBuild()) {
|
if (autoUpdate && plugin.isNumberedBuild()) {
|
||||||
boolean result = updateChecker.grabSnapshotBuild();
|
PluginInformation result = updateChecker.grabSnapshotBuild();
|
||||||
updateMessage = result ? LibsMsg.UPDATE_SUCCESS : LibsMsg.UPDATE_FAILED;
|
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 {
|
} else {
|
||||||
currentVersion = plugin.getBuildNo();
|
currentVersion = plugin.getBuildNo();
|
||||||
updateMessage = LibsMsg.UPDATE_READY_SNAPSHOT;
|
updateMessage = LibsMsg.UPDATE_READY_SNAPSHOT;
|
||||||
|
Loading…
Reference in New Issue
Block a user