diff --git a/src/main/java/org/geysermc/discordbot/commands/FloodgateUuidCommand.java b/src/main/java/org/geysermc/discordbot/commands/FloodgateUuidCommand.java index 8dca5364..0ba5fb73 100644 --- a/src/main/java/org/geysermc/discordbot/commands/FloodgateUuidCommand.java +++ b/src/main/java/org/geysermc/discordbot/commands/FloodgateUuidCommand.java @@ -34,6 +34,8 @@ import org.json.JSONObject; import pw.chew.chewbotcca.util.RestClient; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.UUID; @@ -58,7 +60,7 @@ protected void execute(SlashCommandEvent event) { EmbedBuilder builder = new EmbedBuilder(); builder.setTitle("Floodgate Player UUID"); - RestClient.Response restResponse = RestClient.get("https://api.geysermc.org/v2/xbox/xuid/" + username); + RestClient.Response restResponse = RestClient.get("https://api.geysermc.org/v2/xbox/xuid/" + URLEncoder.encode(username, StandardCharsets.UTF_8)); int serverCode = restResponse.code(); JSONObject response = restResponse.asJSONObject();