Fix deserialization formatting error

This commit is contained in:
jie65535 committed 2023-06-03 00:27:34 +08:00
1 parent bcb88740f1
commit c6e0b51ea6
2 files changed
+2 -2

No files matched your search

@@ -58,7 +58,7 @@ public final class OpenCommandHandler implements Router {
var req = context.bodyAsClass(JsonRequest.class);
if (req.action.equals("sendCode")) {
int playerId = (int) req.data;
int playerId = Integer.parseInt(req.data.toString());
var player = plugin.getServer().getPlayerByUid(playerId);
if (player == null) {
context.json(new JsonResponse(404, "Player Not Found."));
@@ -61,7 +61,7 @@ public final class OpenCommandOnlyHttpHandler implements Router {
var req = context.bodyAsClass(JsonRequest.class);
if (req.action.equals("sendCode")) {
int playerId = (int) req.data;
int playerId = Integer.parseInt(req.data.toString());
var player = SocketData.getPlayer(playerId);
if (player == null) {
context.json(new JsonResponse(404, "Player Not Found."));