Skip to content

Commit 0dbd4b8

Browse files
committed
Merge branch 'dev/3.0.0' into no-config-phase
# Conflicts: # proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientConfigSessionHandler.java
2 parents 3e9af9d + f986eb5 commit 0dbd4b8

40 files changed

+338
-103
lines changed

.github/workflows/gradle.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ jobs:
1010
steps:
1111
- name: Checkout Repository
1212
uses: actions/checkout@v4
13-
- name: Validate Gradle Wrapper
14-
uses: gradle/actions/wrapper-validation@v3
13+
with:
14+
persist-credentials: false
15+
- name: Set up Gradle
16+
uses: gradle/actions/setup-gradle@v4
1517
- name: Set up JDK 17
1618
uses: actions/setup-java@v4
1719
with:
1820
java-version: 17
1921
distribution: 'temurin'
20-
cache: 'gradle'
2122
- name: Build with Gradle
2223
run: ./gradlew build

api/src/main/java/com/velocitypowered/api/event/PostOrder.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
*/
1313
public enum PostOrder {
1414

15-
FIRST, EARLY, NORMAL, LATE, LAST, CUSTOM
15+
FIRST, EARLY, NORMAL, LATE, LAST,
16+
17+
/**
18+
* Previously used to specify that {@link Subscribe#priority()} should be used.
19+
*
20+
* @deprecated No longer required, you only need to specify {@link Subscribe#priority()}.
21+
*/
22+
@Deprecated
23+
CUSTOM
1624

1725
}

api/src/main/java/com/velocitypowered/api/event/Subscribe.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@
3232
* The priority of this event handler. Priorities are used to determine the order in which event
3333
* handlers are called. The higher the priority, the earlier the event handler will be called.
3434
*
35-
* <p>Note that due to compatibility constraints, you must specify {@link PostOrder#CUSTOM}
36-
* in order to use this field.</p>
37-
*
3835
* @return the priority
3936
*/
40-
short priority() default Short.MIN_VALUE;
37+
short priority() default 0;
4138

4239
/**
4340
* Whether the handler must be called asynchronously. By default, all event handlers are called

api/src/main/java/com/velocitypowered/api/event/command/PlayerAvailableCommandsEvent.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import static com.google.common.base.Preconditions.checkNotNull;
1111

12-
import com.google.common.annotations.Beta;
1312
import com.mojang.brigadier.tree.RootCommandNode;
1413
import com.velocitypowered.api.event.annotation.AwaitingEvent;
1514
import com.velocitypowered.api.proxy.Player;
@@ -21,7 +20,6 @@
2120
* client.
2221
*/
2322
@AwaitingEvent
24-
@Beta
2523
public class PlayerAvailableCommandsEvent {
2624

2725
private final Player player;

api/src/main/java/com/velocitypowered/api/event/player/ServerPostConnectEvent.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package com.velocitypowered.api.event.player;
99

10-
import com.google.common.annotations.Beta;
1110
import com.google.common.base.Preconditions;
1211
import com.velocitypowered.api.proxy.Player;
1312
import com.velocitypowered.api.proxy.server.RegisteredServer;
@@ -18,7 +17,6 @@
1817
* available in {@link Player#getCurrentServer()}. Velocity will not wait on this event to finish
1918
* firing.
2019
*/
21-
@Beta
2220
public class ServerPostConnectEvent {
2321
private final Player player;
2422
private final RegisteredServer previousServer;

api/src/main/java/com/velocitypowered/api/event/proxy/server/ServerRegisteredEvent.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package com.velocitypowered.api.event.proxy.server;
99

10-
import com.google.common.annotations.Beta;
1110
import com.google.common.base.Preconditions;
1211
import com.velocitypowered.api.proxy.server.RegisteredServer;
1312
import com.velocitypowered.api.proxy.server.ServerInfo;
@@ -23,7 +22,6 @@
2322
* @param registeredServer A {@link RegisteredServer} that has been registered.
2423
* @since 3.3.0
2524
*/
26-
@Beta
2725
public record ServerRegisteredEvent(@NotNull RegisteredServer registeredServer) {
2826
public ServerRegisteredEvent {
2927
Preconditions.checkNotNull(registeredServer, "registeredServer");

api/src/main/java/com/velocitypowered/api/event/proxy/server/ServerUnregisteredEvent.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package com.velocitypowered.api.event.proxy.server;
99

10-
import com.google.common.annotations.Beta;
1110
import com.google.common.base.Preconditions;
1211
import com.velocitypowered.api.proxy.server.RegisteredServer;
1312
import com.velocitypowered.api.proxy.server.ServerInfo;
@@ -23,7 +22,6 @@
2322
* @param unregisteredServer A {@link RegisteredServer} that has been unregistered.
2423
* @since 3.3.0
2524
*/
26-
@Beta
2725
public record ServerUnregisteredEvent(@NotNull RegisteredServer unregisteredServer) {
2826
public ServerUnregisteredEvent {
2927
Preconditions.checkNotNull(unregisteredServer, "unregisteredServer");

api/src/main/java/com/velocitypowered/api/proxy/InboundConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package com.velocitypowered.api.proxy;
99

10+
import com.velocitypowered.api.network.HandshakeIntent;
1011
import com.velocitypowered.api.network.ProtocolState;
1112
import com.velocitypowered.api.network.ProtocolVersion;
1213
import java.net.InetSocketAddress;
@@ -60,4 +61,11 @@ public interface InboundConnection {
6061
* @return the protocol state of the connection
6162
*/
6263
ProtocolState getProtocolState();
64+
65+
/**
66+
* Returns the initial intent for the connection.
67+
*
68+
* @return the intent of the connection
69+
*/
70+
HandshakeIntent getHandshakeIntent();
6371
}

api/src/main/java/com/velocitypowered/api/proxy/ProxyServer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public interface ProxyServer extends Audience {
4141
*/
4242
void shutdown();
4343

44+
/**
45+
* Returns whether the proxy is currently shutting down.
46+
*
47+
* @return {@code true} if the proxy is shutting down, {@code false} otherwise
48+
*/
49+
boolean isShuttingDown();
50+
4451
/**
4552
* Closes all listening endpoints for this server.
4653
* This includes the main minecraft listener and query channel.

api/src/main/java/com/velocitypowered/api/proxy/player/TabListEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ default IdentifiedKey getIdentifiedKey() {
8080
* <li>150-300 will display 4 bars</li>
8181
* <li>300-600 will display 3 bars</li>
8282
* <li>600-1000 will display 2 bars</li>
83-
* <li>A latency move than 1 second will display 1 bar</li>
83+
* <li>A latency greater than 1 second will display 1 bar</li>
8484
* </ul>
8585
*
8686
* @return latency set for {@code this} entry

0 commit comments

Comments
 (0)