예제 #1
0
 public void writeComments(Appendable appendable, String... comments) throws IOException {
   if (!Helper.isNullOrEmpty(comments))
     for (String line : comments) { // Write all comment lines
       if (!line.equals("\\")) appendable.append(COMMENT_PREFIX).append(line);
       newLine(appendable);
     }
 }
예제 #2
0
  private static Iterator<String> getRandomPlayers(Collection<ProxiedPlayer> players) {
    if (Helper.isNullOrEmpty(players)) return null;

    List<String> result = new ArrayList<>(players.size());

    for (ProxiedPlayer player : players) {
      result.add(player.getName());
    }

    return Randoms.shuffle(result).iterator();
  }