mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Condense this into one function.
This commit is contained in:
		@@ -289,23 +289,19 @@ public class mcMMO extends JavaPlugin {
 | 
				
			|||||||
        Updater updater = new Updater(this, "mcmmo", mcmmo, UpdateType.NO_DOWNLOAD, false);
 | 
					        Updater updater = new Updater(this, "mcmmo", mcmmo, UpdateType.NO_DOWNLOAD, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (updater.getResult() != UpdateResult.UPDATE_AVAILABLE) {
 | 
					        if (updater.getResult() != UpdateResult.UPDATE_AVAILABLE) {
 | 
				
			||||||
 | 
					            this.updateAvailable = false;
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (updater.getLatestVersionString().contains("-beta") && !Config.getInstance().getPreferBeta()) {
 | 
					        if (updater.getLatestVersionString().contains("-beta") && !Config.getInstance().getPreferBeta()) {
 | 
				
			||||||
 | 
					            this.updateAvailable = false;
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        updateCheckerCallback(true);
 | 
					        this.updateAvailable = true;
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void updateCheckerCallback(boolean updateAvailable) {
 | 
					 | 
				
			||||||
        this.updateAvailable = updateAvailable;
 | 
					 | 
				
			||||||
        if (updateAvailable) {
 | 
					 | 
				
			||||||
        getLogger().info(LocaleLoader.getString("UpdateChecker.outdated"));
 | 
					        getLogger().info(LocaleLoader.getString("UpdateChecker.outdated"));
 | 
				
			||||||
        getLogger().info(LocaleLoader.getString("UpdateChecker.newavailable"));
 | 
					        getLogger().info(LocaleLoader.getString("UpdateChecker.newavailable"));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void loadConfigFiles() {
 | 
					    private void loadConfigFiles() {
 | 
				
			||||||
        // Force the loading of config files
 | 
					        // Force the loading of config files
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user