good enough
This commit is contained in:
		
					parent
					
						
							
								39148ee7f1
							
						
					
				
			
			
				commit
				
					
						77a1c8549b
					
				
			
		
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -35,6 +35,7 @@ public class UpdateNotifier extends BukkitRunnable implements Listener { // TODO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void run() {
 | 
						public void run() {
 | 
				
			||||||
 | 
							DebugLogger.info("update task running", 2);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		try {
 | 
							try {
 | 
				
			||||||
			latestVersion = updater.getLatestVersion().join();
 | 
								latestVersion = updater.getLatestVersion().join();
 | 
				
			||||||
| 
						 | 
					@ -42,11 +43,12 @@ public class UpdateNotifier extends BukkitRunnable implements Listener { // TODO
 | 
				
			||||||
			Throwable ex = e.getCause();
 | 
								Throwable ex = e.getCause();
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			if (ex instanceof IOException)
 | 
								if (ex instanceof IOException)
 | 
				
			||||||
				DebugLogger.info("error trying to contact update server: %d", 0, ex.getMessage());
 | 
									DebugLogger.info("error trying to contact update server: %s", 0, ex.getMessage());
 | 
				
			||||||
			else e.printStackTrace();
 | 
								else e.printStackTrace();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		if (latestVersion == null) return;
 | 
							if (latestVersion == null) return;
 | 
				
			||||||
 | 
							DebugLogger.info("RealWeather is outdated. /rwadmin update", 0);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		for (Player player : plugin.getServer().getOnlinePlayers()) {
 | 
							for (Player player : plugin.getServer().getOnlinePlayers()) {
 | 
				
			||||||
			if (player.hasPermission("realweather.update.notify")) {
 | 
								if (player.hasPermission("realweather.update.notify")) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue