From 4811eb155874c7b3e77e9036c525bf6eb99c4c1d Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Fri, 27 Aug 2021 13:50:41 -0700 Subject: [PATCH] Fix /ess dump on 1.8.8 (#4489) Fixes #4487 pain --- .../com/earth2me/essentials/commands/Commandessentials.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java index d17d171433b..876304fe655 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java @@ -16,7 +16,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.gson.JsonArray; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; +import com.google.gson.JsonPrimitive; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -237,7 +239,9 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S pluginData.addProperty("unsupported", warnPlugins.contains(name)); final JsonArray authors = new JsonArray(); - info.getAuthors().forEach(authors::add); + for (final String author : info.getAuthors()) { + authors.add(author == null ? JsonNull.INSTANCE : new JsonPrimitive(author)); + } pluginData.add("authors", authors); if (name.startsWith("Essentials") && !name.equals("Essentials")) {