Skip to content

Commit 2a51db0

Browse files
committed
feat: release v3.9.2
1 parent 169397b commit 2a51db0

File tree

10 files changed

+18
-10
lines changed

10 files changed

+18
-10
lines changed

pojos/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>java-crowd-control</artifactId>
77
<groupId>dev.qixils.crowdcontrol</groupId>
8-
<version>3.9.2-SNAPSHOT</version>
8+
<version>3.9.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

pojos/src/main/java/dev/qixils/crowdcontrol/socket/JsonObject.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ static <T> T fromInputStream(@NotNull InputStream input, @NotNull Function<@NotN
7171
if (!eligible)
7272
return null;
7373

74+
//LoggerFactory.getLogger("CrowdControl/JsonObject").info(inJSON);
75+
7476
// convert to POJO
7577
return jsonMapper.apply(inJSON);
7678
}

pojos/src/main/java/dev/qixils/crowdcontrol/socket/Request.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,13 @@ public Integer getCost() {
220220

221221
/**
222222
* Gets the {@link Type Type} of the request.
223+
* May be null for unknown types.
223224
*
224225
* @return request type
225226
* @since 1.0.0
226227
*/
227228
@ApiStatus.AvailableSince("1.0.0")
228-
@NotNull
229+
@Nullable
229230
@CheckReturnValue
230231
public Type getType() {
231232
return type;
@@ -556,6 +557,13 @@ public enum Type implements ByteObject {
556557
@ApiStatus.AvailableSince("3.0.0")
557558
@ApiStatus.Internal
558559
LOGIN(TriState.UNKNOWN, (byte) 0xF0), // 240
560+
/**
561+
* Requests the current state of the game.
562+
*
563+
* @since 3.9.2
564+
*/
565+
@ApiStatus.AvailableSince("3.9.2")
566+
REQUEST_STATE(TriState.UNKNOWN, (byte) 0xFD), // 253
559567
/**
560568
* This packet's sole purpose is to establish that the connection with the
561569
* Crowd Control server has not been dropped.

pojos/src/test/java/dev/qixils/crowdcontrol/TimedEffectTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ public void methodTests() {
9898
Assertions.assertThrows(IllegalStateException.class, timedEffect::complete); // will throw because effect has not started
9999
Assertions.assertThrows(IllegalStateException.class, () -> timedEffect.complete(true)); // will throw because effect has not started
100100
Assertions.assertThrows(IllegalStateException.class, () -> timedEffect.complete(false)); // will throw because effect has not started
101-
Assertions.assertThrows(IllegalStateException.class, timedEffect::queue); // will throw because request is invalid
102-
Assertions.assertThrows(IllegalStateException.class, timedEffect::queue); // will throw because effect is already queued
103101

104102
TimedEffect newEffect = timedEffect.toBuilder().effectGroup("blah").build();
105103
Assertions.assertEquals("blah", newEffect.getEffectGroup());

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>dev.qixils.crowdcontrol</groupId>
99
<artifactId>java-crowd-control</artifactId>
10-
<version>3.9.2-SNAPSHOT</version> <!-- don't forget to update scm tags & submodule versions -->
10+
<version>3.9.2</version> <!-- don't forget to update scm tags & submodule versions -->
1111
<packaging>pom</packaging>
1212

1313
<modules>

receiver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>java-crowd-control</artifactId>
77
<groupId>dev.qixils.crowdcontrol</groupId>
8-
<version>3.9.2-SNAPSHOT</version>
8+
<version>3.9.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

receiver/src/main/java/dev/qixils/crowdcontrol/CrowdControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public void handle(@NotNull Request request) {
425425
effectHandlers.get(effect).apply(request).send();
426426
else if (asyncHandlers.containsKey(effect))
427427
asyncHandlers.get(effect).accept(request);
428-
else if (effect != null && !effect.isEmpty() && request.getType().isEffectType()) {
428+
else if (effect != null && !effect.isEmpty() && request.getType() != null && request.getType().isEffectType()) {
429429
request.buildResponse().type(Response.ResultType.UNAVAILABLE).message("The effect couldn't be found").send();
430430
request.buildResponse().id(0).packetType(Response.PacketType.EFFECT_STATUS).type(Response.ResultType.NOT_VISIBLE).send();
431431
}

sender/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>java-crowd-control</artifactId>
77
<groupId>dev.qixils.crowdcontrol</groupId>
8-
<version>3.9.2-SNAPSHOT</version>
8+
<version>3.9.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

sender/src/main/java/dev/qixils/crowdcontrol/socket/RequestHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private void loop() {
246246
}
247247

248248
private void writeRequest(@NotNull Request request, @NotNull FluxSink<Response> sink) {
249-
assert isAcceptingRequests() || (isRunning() && !request.getType().isEffectType());
249+
assert isAcceptingRequests() || (isRunning());//TODO: what? && !request.getType().isEffectType());
250250
try {
251251
outputStream.write(request.toJSON().getBytes(StandardCharsets.UTF_8));
252252
outputStream.write(0x00);

tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>java-crowd-control</artifactId>
77
<groupId>dev.qixils.crowdcontrol</groupId>
8-
<version>3.9.2-SNAPSHOT</version>
8+
<version>3.9.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

0 commit comments

Comments
 (0)