Player Endpoint implementation
Hypixel API Endpoint: api.hypixel.net/player
This endpoint returns the player data by uuid
Usage
Create a new Player
object with client and uuid.
const player = new Player(client, 'uuid');
Other functions
List of all Player
methods:
getPlayerData
- Get the player data and cache it to a variableget
- Get the playergetUUID
- Get the UUID of the playergetStatus
- Get the status of the playergetKarma
- Get the karma of the playergetNetworkExp
- Get the network experience of the playergetLevel
- Get the network level of the playergetExactLevel
- Get exact network level of the playergetGuild
- Get the guild membership of the player or nullisStaff
- Check if the player is in the staff teamgetHighestRank
- Get the highest rank of the playergetPlusColor
- Get the rank plus colorgetName
- Get the display name of the playergetRecentGameType
- Get recently played games by the playergetSocialMedia
- Get player connected social mediagetStats
- Get the playerStats
Get stats of the player:
const stats = player.getStats();
Get any minigame stats
const minigame = stats.getByName('name');
List of all Stats
methods:
get
- Get all minigame statsgetByName
- Get one minigame stats by the namegetBedwars
- Get BedWars-specific statsgetSkyWars
- Get SkyWars-specific stats
BedWars & SkyWars
Due to the complexity of both minigames, you can get specific stats.
Examples:
-
BedWars
const bedwars = stats.getBedwars();
-
SkyWars
const skywars = stats.getSkyWars();
List of all BedwarsMinigame
methods:
get
- Get all the BedWars statsgetCoins
- Get BedWars coinsgetLevel
- Get BedWars level (see Leveling)getIronCollected
- Get collected IrongetGoldCollected
- Get collected GoldgetDiamondsCollected
- Get collected DiamondsgetEmeraldsCollected
- Get collected EmeraldsgetWinstreak
- Get the current winstreakgetKills
- Get BedWars KillsgetFinalKills
- Get BedWars final KillsgetDeaths
- Get BedWars DeathsgetFinalDeaths
- Get BedWars final DeathsgetWins
- Get BedWars winsgetLosses
- Get BedWars lossesgetBedsBroken
- Get broken beds amount
List of all SkyWarsMinigame
methods:
get
- Get all the SkyWars statsgetCoins
- Get SkyWars coinsgetLevel
- Get SkyWars level (see Leveling)getSouls
- Get all soulsgetSoulsGathered
- Get souls gatheredgetSoulWellUses
- Get uses of the soul wellgetSoullWellLegendaries
- Get the legendary drops from the soul wellgetSoulWellRares
- Get the rare drops from the soul wellgetChestsOpened
- Get the amount of opened chestsgetBlocksBroken
- Get the amount of broken blocksgetBlocksPlaced
- Get the amount of placed blocksgetEggs
- Get the amount of thrown EggsgetEnderpearls
- Get the amount of thrown EnderpearlsgetArrowsShot
- Get the amount of shot arrowsgetArrowsHit
- Get the amount of arrows that hitgetWinstreak
- Get the current winstreakgetKills
- Get SkyWars KillsgetVoidKills
- Get SkyWars void KillsgetAssists
- Get SkyWars AssistsgetDeaths
- Get SkyWars DeathsgetWins
- Get SkyWars winsgetLosses
- Get SkyWars lossesgetHeads
- Get the amount of collected headsgetHeadCollection
- Get the head collection
Leveling
Player has its own leveling system.
See Player Leveling system implementation by Plancke.
You can use PlayerLeveling
in your project.
List of all PlayerLeveling
methods:
getExactLevel
- Get exact network level by provided experiencegetLevel
- Get network level by provided experiencegetPercentageToNextLevel
- Get percentage to the next levelgetTotalExpToLevel
- Get the experience needed to reach provided levelgetTotalExpToFullLevel
- Get the total experience needed to reach provided level
Both BedWars and SkyWars also have their own leveling system.
See SkyWars & BedWars Leveling system implementation by Plancke.
You can also use both BedwarsLeveling
& SkyWarsLeveling
in your project.
List of all BedwarsLeveling
methods:
getLevelByExp
- Get BedWars Level by provided experiencegetExpByLevel
- Get BedWars Experience by provided Level
List of all SkyWarsLeveling
methods:
getProgressCurrentLevel
- Get the progress of the current levelgetLevelByExp
- Get SkyWars Level by provided experiencegetExpByLevel
- Get SkyWars Experience by provided Level