예제 #1
0
  @Override
  protected Set<String> requestDo(HInput input, HOutput output) throws IOException {
    int count = input.readLength(0);

    // Read all update dirs names
    Set<String> result = new HashSet<>(count);
    for (int i = 0; i < count; i++) {
      result.add(IOHelper.verifyFileName(input.readString(255)));
    }

    // We're done. Make it unmodifiable and return
    return Collections.unmodifiableSet(result);
  }
예제 #2
0
  @Override
  protected PlayerProfile requestDo(HInput input, HOutput output) throws IOException {
    output.writeUUID(uuid);
    output.flush();

    // Return profile
    return input.readBoolean() ? new PlayerProfile(input) : null;
  }