diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 865c9390..f3d18540 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -6,18 +6,28 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-24.04 + runs-on: namespace-profile-linux-default steps: - name: Checkout Repository - uses: actions/checkout@v6 + uses: namespacelabs/nscloud-checkout-action@v9 with: persist-credentials: false + - name: Set up cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + cache: gradle + - name: Setup gradle build cache + run: | + nsc cache gradle setup --init-gradle /tmp/init.gradle - name: Set up Gradle - uses: gradle/actions/setup-gradle@v5 + uses: gradle/actions/setup-gradle@v6 + with: + cache-disabled: true # namespace handles this - name: Set up JDK 21 - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: java-version: 21 distribution: 'zulu' + cache: "" # namespace handles this - name: Build with Gradle - run: ./gradlew build + run: ./gradlew --init-script=/tmp/init.gradle build diff --git a/README.md b/README.md index aa6527f0..7441044f 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,5 @@ page. Translations are handled using [Crowdin](https://papermc-io.crowdin.com/velocity). If you want to translate a language not available on Crowdin, you might want to ask in the [Discord](https://discord.gg/papermc) about it. + +[![CI powered by namespace badge](https://papermc.io/assets/misc/namespace-oss-badge.svg?project=velocity)](https://namespace.so/github-actions/?utm_source=oss&utm_campaign=papermc) diff --git a/api/src/main/java/com/velocitypowered/api/event/connection/PreLoginEvent.java b/api/src/main/java/com/velocitypowered/api/event/connection/PreLoginEvent.java index 952cb091..3407bcdb 100644 --- a/api/src/main/java/com/velocitypowered/api/event/connection/PreLoginEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/connection/PreLoginEvent.java @@ -73,6 +73,7 @@ public final class PreLoginEvent implements ResultedEventThis value is {@code null} on 1.19.2 and lower, * up to 1.20.1 it is optional and from 1.20.2 it will always be available.

* diff --git a/api/src/main/java/com/velocitypowered/api/event/player/PlayerClientBrandEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/PlayerClientBrandEvent.java index 268d5b6a..2a671ac6 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/PlayerClientBrandEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/PlayerClientBrandEvent.java @@ -40,9 +40,9 @@ public final class PlayerClientBrandEvent { @Override public String toString() { return "PlayerClientBrandEvent{" - + "player=" + player - + ", brand='" + brand + '\'' - + '}'; + + "player=" + player + + ", brand='" + brand + '\'' + + '}'; } } diff --git a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerConfigurationEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerConfigurationEvent.java index 6e042af1..60b172f6 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerConfigurationEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerConfigurationEvent.java @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull; /** * This event is executed when a player entered the configuration state and can be configured by Velocity. + * *

Velocity will wait for this event before continuing/ending the configuration state.

* * @param player The player who can be configured. diff --git a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnterConfigurationEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnterConfigurationEvent.java index 05d6c2af..01782d63 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnterConfigurationEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnterConfigurationEvent.java @@ -15,6 +15,7 @@ import org.jetbrains.annotations.NotNull; /** * This event is executed when a player is about to enter the configuration state. * It is not called for the initial configuration of a player after login. + * *

Velocity will wait for this event before asking the client to enter configuration state. * However due to backend server being unable to keep the connection alive during state changes, * Velocity will only wait for a maximum of 5 seconds.

diff --git a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnteredConfigurationEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnteredConfigurationEvent.java index c1677706..6560f7bc 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnteredConfigurationEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerEnteredConfigurationEvent.java @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull; /** * This event is executed when a player has entered the configuration state. + * *

From this moment on, until the {@link PlayerFinishedConfigurationEvent} is executed, * the {@linkplain Player#getProtocolState()} method is guaranteed * to return {@link ProtocolState#CONFIGURATION}.

diff --git a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishConfigurationEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishConfigurationEvent.java index 50df5a8a..ab87974a 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishConfigurationEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishConfigurationEvent.java @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull; /** * This event is executed when a player is about to finish the configuration state. + * *

Velocity will wait for this event before asking the client to finish the configuration state. * However due to backend server being unable to keep the connection alive during state changes, * Velocity will only wait for a maximum of 5 seconds. If you need to hold a player in configuration diff --git a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishedConfigurationEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishedConfigurationEvent.java index 517f119c..994a1d41 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishedConfigurationEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/configuration/PlayerFinishedConfigurationEvent.java @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull; /** * This event is executed when a player has finished the configuration state. + * *

From this moment on, the {@link Player#getProtocolState()} method * will return {@link ProtocolState#PLAY}.

* diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolState.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolState.java index 0ecc8287..cd9b04d5 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolState.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolState.java @@ -16,6 +16,7 @@ package com.velocitypowered.api.network; public enum ProtocolState { /** * Initial connection State. + * *

This status can be caused by a {@link HandshakeIntent#STATUS}, * {@link HandshakeIntent#LOGIN} or {@link HandshakeIntent#TRANSFER} intent.

* If the intent is LOGIN or TRANSFER, the next state will be {@link #LOGIN}, @@ -24,6 +25,7 @@ public enum ProtocolState { HANDSHAKE, /** * Ping State of a connection. + * *

Connections with the {@link HandshakeIntent#STATUS} intent will pass through this state * and be disconnected after it requests the ping from the server * and the server responds with the respective ping.

@@ -31,11 +33,13 @@ public enum ProtocolState { STATUS, /** * Authentication State of a connection. + * *

At this moment the player is authenticating with the authentication servers.

*/ LOGIN, /** * Configuration State of a connection. + * *

At this point the player allows the server to send information * such as resource packs and plugin messages, at the same time the player * will send his client brand and the respective plugin messages @@ -46,6 +50,7 @@ public enum ProtocolState { CONFIGURATION, /** * Game State of a connection. + * *

In this state is where the whole game runs, the server is able to change * the player's state to {@link #CONFIGURATION} as needed in versions 1.20.2 and higher.

*/ diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java index 7f6912a6..6653ff9c 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java @@ -96,7 +96,8 @@ public enum ProtocolVersion implements Ordered { MINECRAFT_1_21_9(773, "1.21.9", "1.21.10"), MINECRAFT_1_21_11(774, "1.21.11"), MINECRAFT_26_1(775, "26.1", "26.1.1", "26.1.2"), - MINECRAFT_26_2(776, "26.2"); + MINECRAFT_26_2(776, "26.2"), + MINECRAFT_26_3(777, "26.3"); private static final int SNAPSHOT_BIT = 30; diff --git a/api/src/main/java/com/velocitypowered/api/permission/Tristate.java b/api/src/main/java/com/velocitypowered/api/permission/Tristate.java index ddbe26a8..0d81b1dc 100644 --- a/api/src/main/java/com/velocitypowered/api/permission/Tristate.java +++ b/api/src/main/java/com/velocitypowered/api/permission/Tristate.java @@ -15,7 +15,6 @@ import org.checkerframework.checker.nullness.qual.Nullable; * Represents three different states of a setting. * *

Possible values:

- *

*