fix: removed legacy gameprofile value

since mojang account migration has ended, there are no more legacy accounts.
This commit is contained in:
J-onasJones 2023-09-21 21:19:22 +02:00
parent c23bcd09d2
commit ab1ab33446
4 changed files with 4 additions and 6 deletions

View file

@ -39,13 +39,13 @@ public class McWebserver implements ModInitializer {
//start collecting api info //start collecting api info
ApiHandler.startHandler(); ApiHandler.startHandler();
LOGGER.info("Server API enabled!"); LOGGER.info("Server API enabled!");
if (ADV_API_ENABLED) { /*if (ADV_API_ENABLED) {
//start collecting advanced api info //start collecting advanced api info
ApiHandler.startAdvHandler(); ApiHandler.startAdvHandler();
LOGGER.info("Advanced Server API enabled!"); LOGGER.info("Advanced Server API enabled!");
} else { } else {
LOGGER.info("Advanced Server API disabled in the config file."); LOGGER.info("Advanced Server API disabled in the config file.");
} }*/
} else { } else {
LOGGER.info("Server API disabled in the config file."); LOGGER.info("Server API disabled in the config file.");
} }

View file

@ -80,7 +80,7 @@ public class ApiHandler {
}); });
} }
public static void startAdvHandler() { /*public static void startAdvHandler() {
ServerTickEvents.END_SERVER_TICK.register(server -> { ServerTickEvents.END_SERVER_TICK.register(server -> {
if (server.isRunning()) { if (server.isRunning()) {
ApiRequestsUtil.setSERVER_PLAYER_ENTITY_LIST(server.getPlayerManager().getPlayerList()); ApiRequestsUtil.setSERVER_PLAYER_ENTITY_LIST(server.getPlayerManager().getPlayerList());
@ -93,6 +93,6 @@ public class ApiHandler {
//SERVER_PLAYER_ENTITY_LIST = server.getPlayerInteractionManager().getPlayerList(); //SERVER_PLAYER_ENTITY_LIST = server.getPlayerInteractionManager().getPlayerList();
} }
}); });
} }*/
} }

View file

@ -95,7 +95,6 @@ public class ApiRequestsUtil {
player.setID(profile.getId().toString()); player.setID(profile.getId().toString());
player.setNAME(profile.getName()); player.setNAME(profile.getName());
//player.setPROPERTIES(profile.getProperties().toString()); //Add support for the properties later //player.setPROPERTIES(profile.getProperties().toString()); //Add support for the properties later
player.setLEGACY(profile.isLegacy());
players.add(player); players.add(player);
} }
return players; return players;

View file

@ -7,5 +7,4 @@ public class ApiServerMetadataPlayer {
private String ID; private String ID;
private String NAME; private String NAME;
private String PROPERTIES; private String PROPERTIES;
private Boolean LEGACY;
} }