Skip to content

Commit

Permalink
Fix gson incompatibility on 1.8.8 (#5067)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored Aug 17, 2022
1 parent dfcb9a1 commit 5768665
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import net.ess3.api.IEssentials;
import org.bukkit.command.Command;
import org.bukkit.command.FormattedCommandAlias;
Expand Down Expand Up @@ -59,8 +60,8 @@ public static JsonObject toJson(IEssentials ess, Command value) {
} else if (value instanceof FormattedCommandAlias) {
json.addProperty("source", "commands.yml");
final JsonArray formatStrings = new JsonArray();
for (String entry : ess.getFormattedCommandAliasProvider().getFormatStrings((FormattedCommandAlias) value)) {
formatStrings.add(entry);
for (final String entry : ess.getFormattedCommandAliasProvider().getFormatStrings((FormattedCommandAlias) value)) {
formatStrings.add(new JsonPrimitive(entry));
}
json.add("bukkit_aliases", formatStrings);
}
Expand Down

0 comments on commit 5768665

Please # to comment.