feat: code
This commit is contained in:
@@ -181,7 +181,7 @@ public class BindRequest {
|
||||
public class PlayerBindStatusResponse implements Serializable {
|
||||
@SerializedName("status") private PlayerBindStatusEnum status;
|
||||
|
||||
@SerializedName("msg") private String message;
|
||||
@SerializedName("message") private String message;
|
||||
|
||||
@SerializedName("cached") private boolean cached;
|
||||
|
||||
@@ -276,14 +276,18 @@ public class BindRequest {
|
||||
}
|
||||
|
||||
public CompletableFuture<PlayerBindStatusResponse> checkPlayerBindStatus(
|
||||
UUID player_uuid, String user_email
|
||||
UUID playerUuid, String userEmail
|
||||
) {
|
||||
String path = "/server/user-bind-status";
|
||||
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
params.put("web_email", user_email);
|
||||
params.put("mc_uuid", player_uuid.toString());
|
||||
params.put("web_email", userEmail);
|
||||
|
||||
if (playerUuid != null) {
|
||||
String simpleUuid = playerUuid.toString().replace("-", "");
|
||||
params.put("mc_uuid", simpleUuid);
|
||||
}
|
||||
|
||||
return networkService.getData(path, params)
|
||||
.thenApply(response -> {
|
||||
@@ -352,14 +356,16 @@ public class BindRequest {
|
||||
}
|
||||
|
||||
public CompletableFuture<PlayerBindResponse> PlayerBindRequest(
|
||||
String webEmail, String playerUuid, String playerUsername
|
||||
String webEmail, UUID playerUuid, String playerUsername
|
||||
) {
|
||||
String path = "/server/user-bind";
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
|
||||
String simpleUuid = playerUuid.toString().replace("-", "");
|
||||
|
||||
json.addProperty("web_email", webEmail);
|
||||
json.addProperty("mc_uuid", playerUuid);
|
||||
json.addProperty("mc_uuid", simpleUuid);
|
||||
json.addProperty("mc_username", playerUsername);
|
||||
|
||||
return networkService.postData(path, json)
|
||||
|
||||
Reference in New Issue
Block a user