fix potential error from issue #9
This commit is contained in:
		
							parent
							
								
									e197dec091
								
							
						
					
					
						commit
						8440795597
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -52,18 +52,17 @@ public class ZUser {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static class ChannelRegistrationFallbackTask extends BukkitRunnable {
 | 
					    private static class ChannelRegistrationFallbackTask extends BukkitRunnable {
 | 
				
			||||||
        private final ZUser user;
 | 
					        private final ZUser user;
 | 
				
			||||||
        private final Player player;
 | 
					 | 
				
			||||||
        private int tries = 5;
 | 
					        private int tries = 5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private ChannelRegistrationFallbackTask(ZUser user) {
 | 
					        private ChannelRegistrationFallbackTask(ZUser user) {
 | 
				
			||||||
            this.user = user;
 | 
					            this.user = user;
 | 
				
			||||||
            this.player = user.toPlayer();
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        @Override
 | 
					        @Override
 | 
				
			||||||
        public void run() {
 | 
					        public void run() {
 | 
				
			||||||
            Exception ex = user.tryRegisterChannel();
 | 
					            Exception ex = user.tryRegisterChannel();
 | 
				
			||||||
            if (!player.isOnline() || ex == null) {
 | 
					            Player player = user.toPlayer();
 | 
				
			||||||
 | 
					            if (player == null || !player.isOnline() || ex == null) {
 | 
				
			||||||
                cancel();
 | 
					                cancel();
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue