HypixelDev / PublicAPI

Official Java implementation of the Hypixel Public API.
https://api.hypixel.net
MIT License
533 stars 152 forks source link

java errors #534

Closed oodvg closed 2 years ago

oodvg commented 2 years ago

Hello, Before the release of 4.2, My guild bot was working fine. Now, it has some errors.

Error 1: package net.hypixel.api.reply does not exist

can I get the updated docs so i can fix the issues with this or can someone tell me what changed?

Thanks.

oodvg commented 2 years ago

Edit: Removed error 2 cause it has something to do with error 1

GrizzlT commented 2 years ago

How is the api declared as dependency?

oodvg commented 2 years ago

all i know was it was working before the 4.2 release.

TheNullicorn commented 2 years ago

If you're using Maven (pom.xml) or Gradle (build.gradle(.kts)), could you send the "dependencies" portion of your build file (the files in parentheses).

oodvg commented 2 years ago

sure. you can use the pom.xml file here

TheNullicorn commented 2 years ago

Thanks! It looks like you have Hypixel's repository added, but haven't asked for any dependencies from it. You can choose from one of three HTTP clients the API provides by default, or create your own.

Apache HTTP Client:

<dependency>
    <groupId>net.hypixel</groupId>
    <artifactId>hypixel-api-transport-apache</artifactId>
    <version>4.2</version>
</dependency>

React HTTP Client:

<dependency>
    <groupId>net.hypixel</groupId>
    <artifactId>hypixel-api-transport-react</artifactId>
    <version>4.2</version>
</dependency>

Unirest HTTP Client:

<dependency>
    <groupId>net.hypixel</groupId>
    <artifactId>hypixel-api-transport-unirest</artifactId>
    <version>4.2</version>
</dependency>

Adding any of those to your pom.xml's <dependencies> block will add the rest of the API to your project as well. Alternatively, you could add the core dependency to your project and implement your own version of net.hypixel.api.http.HypixelHttpClient, but the three mentioned above should be enough for most normal use cases.

oodvg commented 2 years ago

works now. Thanks. thought this was a bug within the API