src/main/java/org/musicbox/core/guild/controllers/Inspector.java
/* wait until someone join the voice channel again */
wait until someone join the voice channel again
wait until someone join the voice channel again
public void waitToQuitIfNecessary(VoiceChannel channel) {
      if (waitingStateTimer != null)
         return;
      waitingStateTimer = new Timer("[" + getGuild().getIdLong() + "-timer]", true);
      waitingStateTimer.schedule(new TimerTask() {
         @Override
         public void run() {
            synchronized (getWrapper().getScheduler()) {
               disconnect();
               getWrapper().getScheduler().stopSchedule();
               destroyTimer();
            }
         }
      }, 60 * 2 * 1000);
   }
public void waitToQuitIfNecessary ( VoiceChannel channel ) { if ( waitingStateTimer != null ) return ; waitingStateTimer = new Timer ( "[" + getGuild ( ) . getIdLong ( ) + "-timer]" , true ) ; waitingStateTimer . schedule ( new TimerTask ( ) { @ Override public void run ( ) { synchronized ( getWrapper ( ) . getScheduler ( ) ) { disconnect ( ) ; getWrapper ( ) . getScheduler ( ) . stopSchedule ( ) ; destroyTimer ( ) ; } } } , 60 * 2 * 1000 ) ; }
wait until someone join the voice channel again
wait until someone join the voice channel again