Skip to content

Commit 85feb8b

Browse files
committed
Format code to ensure consistency.
1 parent 1eea3d9 commit 85feb8b

File tree

5 files changed

+92
-94
lines changed

5 files changed

+92
-94
lines changed

Java/src/main/java/net/hypixel/api/util/IGuildLeveling.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ public interface IGuildLeveling {
1919
* any levels after that.
2020
*/
2121
List<Integer> EXP_NEEDED = Collections.unmodifiableList(Arrays.asList(
22-
100000, // Lvl 0 -> Lvl 1
23-
150000, // Lvl 1 -> Lvl 2
24-
250000, // Lvl 2 -> Lvl 3
25-
500000, // Etc
26-
750000,
27-
1000000,
28-
1250000,
29-
1500000,
30-
2000000,
31-
2500000,
32-
2500000,
33-
2500000,
34-
2500000,
35-
2500000,
36-
3000000
22+
100000, // Lvl 0 -> Lvl 1
23+
150000, // Lvl 1 -> Lvl 2
24+
250000, // Lvl 2 -> Lvl 3
25+
500000, // Etc
26+
750000,
27+
1000000,
28+
1250000,
29+
1500000,
30+
2000000,
31+
2500000,
32+
2500000,
33+
2500000,
34+
2500000,
35+
2500000,
36+
3000000
3737
));
3838

3939
/**

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Hypixel [Code Creations](https://hypixel.net/forums/code-creations.65/) forum.
3737
You can use this API as a dependency via the public Hypixel maven repo. You can also use
3838
the [Example Code](https://github.com/HypixelDev/PublicAPI/tree/master/hypixel-api-example) as a good starting point.
3939

40-
4140
#### Hypixel Maven Repo
41+
4242
```xml
4343
<repository>
4444
<id>Hypixel</id>
@@ -47,6 +47,7 @@ the [Example Code](https://github.com/HypixelDev/PublicAPI/tree/master/hypixel-a
4747
```
4848

4949
This repo can also be used with Gradle.
50+
5051
```gradle
5152
repositories {
5253
maven { url 'https://repo.hypixel.net/repository/Hypixel/' }
@@ -55,8 +56,8 @@ repositories {
5556

5657
#### Transports
5758

58-
We include three built-in options for communicating with the Hypixel API, you can include either of these or even include the
59-
core API directly and create your own instance of HypixelHTTPClient.
59+
We include three built-in options for communicating with the Hypixel API, you can include either of these or even
60+
include the core API directly and create your own instance of HypixelHTTPClient.
6061

6162
* [Apache HttpClient Transport](hypixel-api-transport-apache/README.md)
6263
* [Unirest Java Transport](hypixel-api-transport-unirest/README.md)
@@ -70,7 +71,6 @@ The Hypixel API Core implementation has the following dependencies:
7071

7172
Transports will also have dependencies where required.
7273

73-
7474
### Contributing
7575

7676
When contributing changes to the Java API please provide as much detail on the changes and the reasons for them. We will

hypixel-api-core/src/main/java/net/hypixel/api/reply/RecentGamesReply.java

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,76 +7,76 @@
77

88
public class RecentGamesReply extends AbstractReply {
99

10-
private List<GameSession> games;
11-
12-
/**
13-
* @return Up to 100 of the player's most recently played games
14-
* @see GameSession
15-
*/
16-
public List<GameSession> getGames() {
17-
return games;
18-
}
19-
20-
@Override
21-
public String toString() {
22-
return "RecentGamesReply{" +
23-
"games=" + games +
24-
'}';
25-
}
26-
27-
public static class GameSession {
28-
29-
private ZonedDateTime date;
30-
private GameType gameType;
31-
private String mode;
32-
private String map;
33-
private ZonedDateTime ended;
10+
private List<GameSession> games;
3411

3512
/**
36-
* @return When the game started
13+
* @return Up to 100 of the player's most recently played games
14+
* @see GameSession
3715
*/
38-
public ZonedDateTime getStartDate() {
39-
return date;
16+
public List<GameSession> getGames() {
17+
return games;
4018
}
4119

42-
/**
43-
* @return Game played during this session
44-
* @see GameType
45-
*/
46-
public GameType getGameType() {
47-
return gameType;
20+
@Override
21+
public String toString() {
22+
return "RecentGamesReply{" +
23+
"games=" + games +
24+
'}';
4825
}
4926

50-
/**
51-
* @return Subtype of the game played (e.g. "solo_insane_lucky" for {@link GameType#SKYWARS})
52-
*/
53-
public String getMode() {
54-
return mode;
55-
}
27+
public static class GameSession {
5628

57-
/**
58-
* @return Map that was played on
59-
*/
60-
public String getMap() {
61-
return map;
62-
}
29+
private ZonedDateTime date;
30+
private GameType gameType;
31+
private String mode;
32+
private String map;
33+
private ZonedDateTime ended;
6334

64-
/**
65-
* @return When the game ended. If null, the game is ongoing
66-
*/
67-
public ZonedDateTime getEndDate() {
68-
return ended;
69-
}
35+
/**
36+
* @return When the game started
37+
*/
38+
public ZonedDateTime getStartDate() {
39+
return date;
40+
}
7041

71-
@Override
72-
public String toString() {
73-
return "GameSession{" +
74-
"date=" + date +
75-
", gameType=" + gameType +
76-
", mode='" + mode + '\'' +
77-
", map='" + map + '\'' +
78-
", ended=" + ended +
79-
'}';
42+
/**
43+
* @return Game played during this session
44+
* @see GameType
45+
*/
46+
public GameType getGameType() {
47+
return gameType;
48+
}
49+
50+
/**
51+
* @return Subtype of the game played (e.g. "solo_insane_lucky" for {@link GameType#SKYWARS})
52+
*/
53+
public String getMode() {
54+
return mode;
55+
}
56+
57+
/**
58+
* @return Map that was played on
59+
*/
60+
public String getMap() {
61+
return map;
62+
}
63+
64+
/**
65+
* @return When the game ended. If null, the game is ongoing
66+
*/
67+
public ZonedDateTime getEndDate() {
68+
return ended;
69+
}
70+
71+
@Override
72+
public String toString() {
73+
return "GameSession{" +
74+
"date=" + date +
75+
", gameType=" + gameType +
76+
", mode='" + mode + '\'' +
77+
", map='" + map + '\'' +
78+
", ended=" + ended +
79+
'}';
80+
}
8081
}
81-
}
8282
}

hypixel-api-transport-reactor/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
21
Hypixel Public API - Reactive Transport
32
======
43

54
### Usage
65

76
```xml
7+
88
<dependency>
99
<groupId>net.hypixel</groupId>
1010
<artifactId>hypixel-api-transport-reactor</artifactId>
@@ -39,11 +39,11 @@ public class Main {
3939
```
4040

4141
### Dependencies
42-
42+
4343
This transport depends on the following:
4444

4545
* [Google Gson library - 2.8.6](https://mvnrepository.com/artifact/com.google.code.gson/gson) (for hypixel-api-core)
4646
* [Reactor Core 3.4.5](https://mvnrepository.com/artifact/io.projectreactor/reactor-core) (for reactor netty)
4747
* Reactor Netty [(project-reactor)](https://projectreactor.io/docs):
48-
* [Netty Core 1.0.6](https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty-core)
49-
* [Netty Http 1.0.6](https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty-http)
48+
* [Netty Core 1.0.6](https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty-core)
49+
* [Netty Http 1.0.6](https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty-http)

hypixel-api-transport-reactor/src/main/java/net/hypixel/api/reactor/ReactorHttpClient.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public class ReactorHttpClient implements HypixelHttpClient {
4545
/**
4646
* Constructs a new instance of this client using the specified API key.
4747
*
48-
* @param apiKey the key associated with this connection
48+
* @param apiKey the key associated with this connection
4949
* @param minDelayBetweenRequests minimum time between sending requests (in ms) default is 8
50-
* @param bufferCapacity fixed size of blockingQueue
50+
* @param bufferCapacity fixed size of blockingQueue
5151
*/
5252
public ReactorHttpClient(UUID apiKey, long minDelayBetweenRequests, int bufferCapacity) {
5353
this.apiKey = apiKey;
@@ -76,18 +76,15 @@ public ReactorHttpClient(UUID apiKey, long minDelayBetweenRequests, int bufferCa
7676
}).subscribeOn(Schedulers.boundedElastic()).delayElements(Duration.ofMillis(minDelayBetweenRequests), Schedulers.boundedElastic()).subscribe(RequestCallback::sendRequest);
7777
}
7878

79-
public ReactorHttpClient(UUID apiKey, long minDelayBetweenRequests)
80-
{
79+
public ReactorHttpClient(UUID apiKey, long minDelayBetweenRequests) {
8180
this(apiKey, minDelayBetweenRequests, 500);
8281
}
8382

84-
public ReactorHttpClient(UUID apiKey, int bufferCapacity)
85-
{
83+
public ReactorHttpClient(UUID apiKey, int bufferCapacity) {
8684
this(apiKey, 8, bufferCapacity);
8785
}
8886

89-
public ReactorHttpClient(UUID apiKey)
90-
{
87+
public ReactorHttpClient(UUID apiKey) {
9188
this(apiKey, 8, 500);
9289
}
9390

@@ -120,7 +117,8 @@ public void shutdown() {
120117
/**
121118
* Makes a request to the Hypixel api and returns a {@link Mono<Tuple2<String, Integer>>} containing
122119
* the response body and status code, canceling this mono will prevent the request from being sent if possible
123-
* @param path full url
120+
*
121+
* @param path full url
124122
* @param isAuthenticated whether to enable authentication or not
125123
*/
126124
public Mono<Tuple2<String, Integer>> makeRequest(String path, boolean isAuthenticated) {
@@ -140,7 +138,7 @@ public Mono<Tuple2<String, Integer>> makeRequest(String path, boolean isAuthenti
140138
* Reads response status and retries error 429 (too many requests)
141139
* The first request after every limit reset will be used to schedule the next limit reset
142140
*
143-
* @param response the {@link HttpClientResponse} from our request
141+
* @param response the {@link HttpClientResponse} from our request
144142
* @param requestCallback the callback controlling our request
145143
* @return whether to return the request body or wait for a retry
146144
*/

0 commit comments

Comments
 (0)