Hypixel utilities

OneConfig's utils module provides a set of Hypixel-specific utility methods for a better development experience.

Getting server-side info about the client player (rank, prefix, etc)

HypixelUtils.PlayerInfo playerInfo = HypixelUtils.getPlayerInfo();
Optional<PlayerRank> playerRank = playerInfo.getRank(); // NORMAL, YOUTUBER, GAME MASTER or ADMIN
Optional<PackageRank> packageRank = playerInfo.getPackageRank(); // NONE, VIP, VIP PLUS, MVP, MVP PLUS
Optional<MonthlyPackageRank> monthlyPackageRank = player.getMonthlyPackageRank(); // NONE, SUPERSTAR
Optional<String> prefix = playerInfo.getPrefix();

All of the custom data types contained within PlayerInfo come from the Hypixel HypixelData library.

Getting info about the player's current party

HypixelUtils.PartyInfo partyInfo = HypixelUtils.getPartyInfo();
boolean isInParty = partyInfo.isInParty();
int partySize = partyInfo.getPartySize(); // Returns 0 if the client player is not in a party
Map<UUID, ClientboundPartyInfoPacket.PartyMember> members = partyInfo.getMembers();

All of the custom data types contained within PartyInfo come from the Hypixel ModAPI library.

Getting info about the client player's location on the Hypixel Network

HypixelUtils.Location location = HypixelUtils.getLocation();
Optional<String> lastServerName = location.getLastServerName();
Optional<String> serverName = location.getServerName();
Optional<String> lastLobbyName = location.getLastLobbyName();
Optional<String> lobbyName = location.getLobbyName();
Optional<String> lastMapName = location.getLastMapName();
Optional<String> mapName = location.getMapName();
Optional<String> lastMode = location.getLastMode();
Optional<String> mode = location.getMode();
Optional<ServerType> lastServerType = location.getLastServerType();
Optional<ServerType> serverType = location.getServerType();
boolean wasInLobby = location.wasInLobby();
boolean inLobby = location.inLobby();
boolean wasInGame = location.wasInGame();
boolean inGame = location.inGame();
Optional<GameType> lastGameType = location.getLastGameType();
Optional<GameType> gameType = location.getGameType();

All of the custom data types contained within Location come from the Hypixel HypixelData library.

Last updated