3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Authors should be a JSON array

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-10-26 21:00:08 -04:00
Ursprung 536049995d
Commit 9f424522ac

Datei anzeigen

@ -23,8 +23,6 @@ import java.net.InetSocketAddress;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import joptsimple.internal.Strings;
public enum InformationUtils { public enum InformationUtils {
; ;
@ -51,8 +49,11 @@ public enum InformationUtils {
current.addProperty("version", desc.getVersion().get()); current.addProperty("version", desc.getVersion().get());
} }
if (!desc.getAuthors().isEmpty()) { if (!desc.getAuthors().isEmpty()) {
current.addProperty("authors", JsonArray authorsArray = new JsonArray();
Strings.join(desc.getAuthors(), ",")); for (String author : desc.getAuthors()) {
authorsArray.add(author);
}
current.add("authors", authorsArray);
} }
if (desc.getDescription().isPresent()) { if (desc.getDescription().isPresent()) {
current.addProperty("description", desc.getDescription().get()); current.addProperty("description", desc.getDescription().get());