Ejemplo n.º 1
0
 final Set<UUID> getPlayersOnServer(@NonNull String server) {
   checkArgument(getProxy().getServers().containsKey(server), "server does not exist");
   Collection<String> asStrings =
       (Collection<String>)
           getServerPlayersScript.eval(
               ImmutableList.<String>of(), ImmutableList.<String>of(server));
   ImmutableSet.Builder<UUID> builder = ImmutableSet.builder();
   for (String s : asStrings) {
     builder.add(UUID.fromString(s));
   }
   return builder.build();
 }
Ejemplo n.º 2
0
 final int getCurrentCount() {
   Long count =
       (Long) getPlayerCountScript.eval(ImmutableList.<String>of(), ImmutableList.<String>of());
   return count.intValue();
 }