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 ResultedEvent
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/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:
- * *Note that since 1.20.3 it is no longer recommended to use + *
Note that since 1.20.3 it is no longer recommended to use * this method as it will only return the last applied * resource pack. To get all applied resource packs, use * {@link #getAppliedResourcePacks()} instead.
@@ -260,7 +260,7 @@ public interface Player extends * the user is currently downloading or is currently * prompted to install or null if none. * - *Note that since 1.20.3 it is no longer recommended to use + *
Note that since 1.20.3 it is no longer recommended to use * this method as it will only return the last pending * resource pack. To get all pending resource packs, use * {@link #getPendingResourcePacks()} instead.
@@ -315,6 +315,7 @@ public interface Player extends /** * {@inheritDoc} + * *Note that this method does not send a plugin message to the server the player * is connected to. You should only use this method if you are trying to communicate * with a mod that is installed on the player's client.
@@ -400,7 +401,7 @@ public interface Player extends * and will not perform any actions. * @see #playSound(Sound, Sound.Emitter) * @see - * Unsupported Adventure Operations + * Unsupported Adventure Operations */ @Override default void playSound(@NotNull Sound sound) { @@ -413,7 +414,7 @@ public interface Player extends * and will not perform any actions. * @see #playSound(Sound, Sound.Emitter) * @see - * Unsupported Adventure Operations + * Unsupported Adventure Operations */ @Override default void playSound(@NotNull Sound sound, double x, double y, double z) { @@ -456,7 +457,7 @@ public interface Player extends * and will not perform any actions. * * @see - * Unsupported Adventure Operations + * Unsupported Adventure Operations */ @Override default void openBook(@NotNull Book book) { @@ -469,7 +470,7 @@ public interface Player extends * and will not perform any actions. * * @see - * Unsupported Adventure Operations + * Unsupported Adventure Operations */ @Override default void showDialog(@NotNull DialogLike dialog) { @@ -482,7 +483,7 @@ public interface Player extends * and will not perform any actions. * * @see - * Unsupported Adventure Operations + * Unsupported Adventure Operations */ @Override default void closeDialog() { diff --git a/api/src/main/java/com/velocitypowered/api/proxy/crypto/KeySigned.java b/api/src/main/java/com/velocitypowered/api/proxy/crypto/KeySigned.java index 8ad64c18..c653218e 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/crypto/KeySigned.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/crypto/KeySigned.java @@ -56,6 +56,7 @@ public interface KeySigned { * Validates the signature, expiry temporal and key against the * signer public key. Note: This will **not** check for * expiry. You can check for expiry with {@link KeySigned#hasExpired()}. + * *DOES NOT WORK YET FOR MESSAGES AND COMMANDS!
* Addendum: Does not work for 1.19.1 until the user has authenticated. * diff --git a/api/src/main/java/com/velocitypowered/api/proxy/player/TabListEntry.java b/api/src/main/java/com/velocitypowered/api/proxy/player/TabListEntry.java index aea45287..57a42392 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/player/TabListEntry.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/player/TabListEntry.java @@ -237,8 +237,11 @@ public interface TabListEntry extends KeyIdentifiable { /** * Sets the {@link IdentifiedKey} of the {@link TabListEntry}. + * *This only works for players currently not connected to this proxy.
+ * *For any player currently connected to this proxy this will be filled automatically.
+ * *Will ignore mismatching key revisions data.
* * @param chatSession session to set diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f00c0aca..30325a81 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ brigadier = "com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT" bstats = "org.bstats:bstats-base:3.2.1" caffeine = "com.github.ben-manes.caffeine:caffeine:3.2.4" checker-qual = "org.checkerframework:checker-qual:4.2.3" -checkstyle = "com.puppycrawl.tools:checkstyle:10.9.3" +checkstyle = "com.puppycrawl.tools:checkstyle:14.1.0" completablefutures = "com.spotify:completable-futures:0.3.6" configurate3-hocon = { module = "org.spongepowered:configurate-hocon", version.ref = "configurate3" } configurate3-yaml = { module = "org.spongepowered:configurate-yaml", version.ref = "configurate3" } diff --git a/native/src/main/java/com/velocitypowered/natives/util/MoreByteBufUtils.java b/native/src/main/java/com/velocitypowered/natives/util/MoreByteBufUtils.java index 13f4f0c5..886f2081 100644 --- a/native/src/main/java/com/velocitypowered/natives/util/MoreByteBufUtils.java +++ b/native/src/main/java/com/velocitypowered/natives/util/MoreByteBufUtils.java @@ -54,8 +54,8 @@ public class MoreByteBufUtils { BufferPreference preferred = nativeStuff.preferredBufferType(); return switch (preferred) { case DIRECT_PREFERRED, HEAP_PREFERRED -> - // The native prefers this type, but doesn't strictly require we provide it. - true; + // The native prefers this type, but doesn't strictly require we provide it. + true; case DIRECT_REQUIRED -> buf.hasMemoryAddress(); case HEAP_REQUIRED -> buf.hasArray(); }; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 7c027dd6..4fbeabb9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -653,7 +653,7 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { } /** - * Calls {@link #shutdown(boolean, Component)} with the default reason "Proxy shutting down." + * Calls {@link #shutdown(boolean, Component)} with the default reason "Proxy shutting down". * * @param explicitExit whether the user explicitly shut down the proxy */ diff --git a/proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java b/proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java index aa73cefd..623e3d07 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java @@ -59,6 +59,6 @@ public record PingPassthroughMode(boolean version, boolean players, public boolean enabled() { return this.version || this.players || this.description || this.favicon - || this.modinfo; + || this.modinfo; } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/player/resourcepack/handler/ModernResourcePackHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/player/resourcepack/handler/ModernResourcePackHandler.java index f0fd5e08..3bef8a4b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/player/resourcepack/handler/ModernResourcePackHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/player/resourcepack/handler/ModernResourcePackHandler.java @@ -37,7 +37,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** - * Modern (Minecraft 1.20.3+) ResourcePackHandler + * Modern (Minecraft 1.20.3+) ResourcePackHandler. */ public final class ModernResourcePackHandler extends ResourcePackHandler { private final ListMultimapCases in which no action will be taken:
*