OneConfig V1
  • Welcome
  • Documentation license
  • Introduction
    • Getting started
  • Configuration
    • Creating your config
      • Option dependencies & hiding options
      • Listening for option changes
    • Available options
      • Boolean options
        • Switch option
        • Checkbox option
      • Number options
        • Slider option
        • Number option
      • Selector options
        • Dropdown option
        • Radio button option
      • Text option
      • Color option
      • Keybind option
      • Buttons
      • Accordions
      • Decorations
    • Creating your own options
  • Commands
    • Annotation-based commands
    • Tree-based commands
  • Events
    • Using the events system
      • Callback events
      • Subscriber events
  • Utilities Module
    • Hypixel utilities
    • IO utilities
    • Networking utilities
    • JSON utilities
    • Multithreading
    • Platform-specific utilities
  • Migration
    • Temporary V0 -> V1 migration guide
    • Migrating your configs from Vigilance
Powered by GitBook
On this page
  • Getting server-side info about the client player (rank, prefix, etc)
  • Getting info about the player's current party
  • Getting info about the client player's location on the Hypixel Network
Export as PDF
  1. Utilities Module

Hypixel utilities

PreviousSubscriber eventsNextIO utilities

Last updated 5 months ago

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();
val playerInfo = HypixelUtils.getPlayerInfo()
val playerRank = playerInfo.getRank().getOrNull() // NORMAL, YOUTUBER, GAME MASTER or ADMIN
val packageRank = playerInfo.getPackageRank().getOrNull() // NONE, VIP, VIP PLUS, MVP, MVP PLUS
val monthlyPackageRank = player.getMonthlyPackageRank().getOrNull() // NONE, SUPERSTAR
val prefix = playerInfo.getPrefix().getOrNull()

All of the custom data types contained within PlayerInfo come from the 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();
val partyInfo = HypixelUtils.getPartyInfo()
val isInParty = partyInfo.isInParty()
val partySize = partyInfo.getPartySize() // Returns 0 if the client player is not in a party
val members: Map<UUID, ClientboundPartyInfoPacket.PartyMember> = partyInfo.getMembers()

All of the custom data types contained within PartyInfo come from the 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();
val location = HypixelUtils.getLocation()
val lastServerName: Optional<String> = location.lastServerName
val serverName: Optional<String> = location.serverName
val lastLobbyName: Optional<String> = location.lastLobbyName
val lobbyName: Optional<String> = location.lobbyName
val lastMapName: Optional<String> = location.lastMapName
val mapName: Optional<String> = location.mapName
val lastMode: Optional<String> = location.lastMode
val mode: Optional<String> = location.mode
val lastServerType: Optional<ServerType> = location.lastServerType
val serverType: Optional<ServerType> = location.serverType
val wasInLobby: Boolean = location.wasInLobby()
val inLobby: Boolean = location.inLobby()
val wasInGame: Boolean = location.wasInGame()
val inGame: Boolean = location.inGame()
val lastGameType: Optional<GameType> = location.lastGameType
val gameType: Optional<GameType> = location.gameType

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

Hypixel HypixelData
Hypixel ModAPI
Hypixel HypixelData