@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); }
@Override protected PlayerProfile requestDo(HInput input, HOutput output) throws IOException { output.writeUUID(uuid); output.flush(); // Return profile return input.readBoolean() ? new PlayerProfile(input) : null; }