Fix the NPEs with the updater

This commit is contained in:
Telesphoreo 2020-08-14 14:34:37 -05:00
parent fc73795ae4
commit 0f203a5971
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.lenis0012.bukkit</groupId>
<artifactId>marriage2</artifactId>
<version>2.0.20</version>
<version>2.0.20-TF</version>
<packaging>jar</packaging>
<name>Marriage</name>

View File

@ -139,12 +139,12 @@ public class MarriageCore extends MarriageBase {
);
}
@Register(name = "updater", type = Type.ENABLE, priority = 9)
/*@Register(name = "updater", type = Type.ENABLE, priority = 9)
public void loadUpdater() {
UpdaterFactory factory = new UpdaterFactory(plugin, "com.lenis0012.bukkit.marriage2.libs.updater");
this.updater = factory.newUpdater(plugin.getPluginFile(), Settings.ENABLE_UPDATE_CHECKER.value());
updater.setChannel(ReleaseType.valueOf(Settings.UPDATER_CHANNEL.value().toUpperCase()));
}
}*/
@Register(name = "converter", type = Register.Type.ENABLE, priority = 10)
public void loadConverter() {

View File

@ -27,7 +27,7 @@ public class UpdateListener implements Listener {
Bukkit.getScheduler().runTaskLaterAsynchronously(core.getPlugin(), new Runnable() {
@Override
public void run() {
boolean update = updater.hasUpdate();
boolean update = false;
if(update) {
Bukkit.getScheduler().runTask(core.getPlugin(), new Runnable() {
@Override