src/main/java/org/musicbox/core/utils/Utilities.java
/* this is ugly xdd but yeah*/
this is ugly xdd but yeah
this is ugly xdd but yeah
public static List<String> spliceTracklist(TrackScheduler scheduler){
      List<String> splices = new ArrayList<>();
      StringBuilder builder = new StringBuilder();
      for(int i = 0; i < scheduler.getTracklist().size(); i++) {
         String trackName = i + " - " + scheduler.getTracklist().get(i).getInfo().title;
         if(scheduler.getCurrentPosition() == i) {
            trackName = "```fix\n" + trackName + " [NOW]```";
         }
         else {
            trackName = "```\n" + trackName + "```";
         }
         if(i % 5 == 0 && i != 0) {
            splices.add(builder.toString().trim());
            builder.delete(0, builder.length());
         }
         builder.append(trackName).append('\n');
      }
      splices.add(builder.toString().trim());
      return splices;
   }
public static List < String > spliceTracklist ( TrackScheduler scheduler ) { List < String > splices = new ArrayList < > ( ) ; StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < scheduler . getTracklist ( ) . size ( ) ; i ++ ) { String trackName = i + " - " + scheduler . getTracklist ( ) . get ( i ) . getInfo ( ) . title ; if ( scheduler . getCurrentPosition ( ) == i ) { trackName = "```fix\n" + trackName + " [NOW]```" ; } else { trackName = "```\n" + trackName + "```" ; } if ( i % 5 == 0 && i != 0 ) { splices . add ( builder . toString ( ) . trim ( ) ) ; builder . delete ( 0 , builder . length ( ) ) ; } builder . append ( trackName ) . append ( '\n' ) ; } splices . add ( builder . toString ( ) . trim ( ) ) ; return splices ; }
this is ugly xdd but yeah
this is ugly xdd but yeah