3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-24 15:20:35 +01:00

Massively improved Javadoc coverage to prepare for Javadoc site.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-25 00:29:22 -04:00
Ursprung 4fb415c845
Commit 7ee56d9f5f
49 geänderte Dateien mit 214 neuen und 79 gelöschten Zeilen

Datei anzeigen

@ -48,6 +48,21 @@ artifacts {
archives sourcesJar
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.links(
'http://www.slf4j.org/apidocs/',
'https://google.github.io/guava/releases/25.1-jre/api/docs/',
'https://google.github.io/guice/api-docs/4.2/javadoc/',
'https://jd.kyori.net/text/1.12-1.6.4/',
'https://docs.oracle.com/javase/8/docs/api/'
)
// Disable the crazy super-strict doclint tool in Java 8
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
publications {
mavenJava(MavenPublication) {

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides a simple command framework.
*/
package com.velocitypowered.api.command;

Datei anzeigen

@ -19,7 +19,7 @@ public interface ResultedEvent<R extends ResultedEvent.Result> {
R getResult();
/**
* Sets the result of this event.
* Sets the result of this event. The result must be non-null.
* @param result the new result
*/
void setResult(@NonNull R result);
@ -28,6 +28,11 @@ public interface ResultedEvent<R extends ResultedEvent.Result> {
* Represents a result for an event.
*/
interface Result {
/**
* Returns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the
* proxy will respect the result of this method.
* @return whether or not the event is allowed to proceed
*/
boolean isAllowed();
}

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides events for handling incoming connections to the proxy and loigns.
*/
package com.velocitypowered.api.event.connection;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides core support for handling events with Velocity. Subpackages include event classes.
*/
package com.velocitypowered.api.event;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides events to handle setting up permissions for permission subjects.
*/
package com.velocitypowered.api.event.permission;

Datei anzeigen

@ -1,4 +1,4 @@
package com.velocitypowered.api.event.player.gameprofile;
package com.velocitypowered.api.event.player;
import com.velocitypowered.api.proxy.InboundConnection;
import org.checkerframework.checker.nullness.qual.Nullable;
@ -43,7 +43,7 @@ public class GameProfileRequestEvent {
/**
* Returns the game profile that will be used to initialize the connection with. Should no profile be currently
* specified, the one generated by the proxy (for offline mode) or retrieved from the Mojang session servers (for
* online mode).
* online mode) will be returned instead.
* @return the user's {@link GameProfile}
*/
public GameProfile getGameProfile() {
@ -51,7 +51,7 @@ public class GameProfileRequestEvent {
}
/**
* Sets the game profile to use for this connection. Using this method on an online-mode connection is invalid.
* Sets the game profile to use for this connection. It is invalid to use this method on an online-mode connection.
* @param gameProfile the profile to use for the connection, {@code null} uses the original profile
*/
public void setGameProfile(@Nullable GameProfile gameProfile) {

Datei anzeigen

@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
/**
* This event is fired once the player has successfully connected to the target server and the connection to the previous

Datei anzeigen

@ -3,7 +3,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.event.ResultedEvent;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides events for handling actions performed by players.
*/
package com.velocitypowered.api.event.player;

Datei anzeigen

@ -2,8 +2,11 @@ package com.velocitypowered.api.event.proxy;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.server.ServerPing;
import com.velocitypowered.api.proxy.server.ServerPing;
/**
* This event is fired when a server list ping request is sent by a remote client.
*/
public class ProxyPingEvent {
private final InboundConnection connection;
private ServerPing ping;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides events for handling the lifecycle of the proxy.
*/
package com.velocitypowered.api.event.proxy;

Datei anzeigen

@ -1,5 +0,0 @@
package com.velocitypowered.api;
/**
* Welcome to the Velocity API documentation.
*/

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides the basic building blocks for a custom permission system.
*/
package com.velocitypowered.api.permission;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides annotations to handle injecting dependencies for plugins.
*/
package com.velocitypowered.api.plugin.annotation;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides metadata for plugins.
*/
package com.velocitypowered.api.plugin.meta;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides the Velocity plugin API.
*/
package com.velocitypowered.api.plugin;

Datei anzeigen

@ -1,6 +1,6 @@
package com.velocitypowered.api.proxy;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import net.kyori.text.Component;
import org.checkerframework.checker.nullness.qual.NonNull;
@ -8,8 +8,8 @@ import java.util.Optional;
import java.util.concurrent.CompletableFuture;
/**
* Represents a connection request. A connection request is created using {@link Player#createConnectionRequest(ServerInfo)}
* and is used to allow a plugin to compose and request a connection to another Minecraft server using a fluent API.
* Provides a fluent interface to compose and send a connection request to another server behind the proxy. A connection
* request is created using {@link Player#createConnectionRequest(ServerInfo)}.
*/
public interface ConnectionRequestBuilder {
/**
@ -50,7 +50,7 @@ public interface ConnectionRequestBuilder {
Status getStatus();
/**
* Returns a reason for the failure to connect to the server. None may be provided.
* Returns an (optional) textual reason for the failure to connect to the server.
* @return the reason why the user could not connect to the server
*/
Optional<Component> getReason();

Datei anzeigen

@ -4,7 +4,7 @@ import java.net.InetSocketAddress;
import java.util.Optional;
/**
* Represents a connection to the proxy. There is no guarantee that the connection has been fully initialized.
* Represents an incoming connection to the proxy.
*/
public interface InboundConnection {
/**

Datei anzeigen

@ -3,7 +3,7 @@ package com.velocitypowered.api.proxy;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.api.util.MessagePosition;
import net.kyori.text.Component;
import org.checkerframework.checker.nullness.qual.NonNull;
@ -56,19 +56,20 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
ConnectionRequestBuilder createConnectionRequest(@NonNull ServerInfo info);
/**
* Sets a header and footer to the player
* @param header component with header
* @param footer component with footer
* Sets the tab list header and footer for the player.
* @param header the header component
* @param footer the footer component
*/
void setHeaderAndFooter(Component header, Component footer);
/**
* Clears a header and footer for the player
* Clears the tab list header and footer for the player.
*/
void clearHeaderAndFooter();
/**
* Disconnects the player with the reason
* Disconnects the player with the specified reason. Once this method is called, further calls to other {@link Player}
* methods will become undefined.
* @param reason component with the reason
*/
void disconnect(Component reason);

Datei anzeigen

@ -6,27 +6,27 @@ import com.velocitypowered.api.event.EventManager;
import com.velocitypowered.api.plugin.PluginManager;
import com.velocitypowered.api.proxy.messages.ChannelRegistrar;
import com.velocitypowered.api.scheduler.Scheduler;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import java.util.Collection;
import java.util.Optional;
import java.util.UUID;
/**
* Represents a Minecraft proxy server that is compatible with the Velocity API.
* Provides an interface to a Minecraft server proxy.
*/
public interface ProxyServer {
/**
* Retrieves the player currently connected to this proxy by their Minecraft username.
* @param username the username
* @return an {@link Optional} with the player
* Retrieves the player currently connected to this proxy by their Minecraft username. The search is case-insensitive.
* @param username the username to search for
* @return an {@link Optional} with the player, which may be empty
*/
Optional<Player> getPlayer(String username);
/**
* Retrieves the player currently connected to this proxy by their Minecraft UUID.
* @param uuid the UUID
* @return an {@link Optional} with the player
* @return an {@link Optional} with the player, which may be empty
*/
Optional<Player> getPlayer(UUID uuid);
@ -44,9 +44,9 @@ public interface ProxyServer {
int getPlayerCount();
/**
* Retrieves a registered {@link ServerInfo} instance by its name.
* Retrieves a registered {@link ServerInfo} instance by its name. The search is case-insensitive.
* @param name the name of the server
* @return the server
* @return the registered server, which may be empty
*/
Optional<ServerInfo> getServerInfo(String name);

Datei anzeigen

@ -2,7 +2,7 @@ package com.velocitypowered.api.proxy;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
/**
* Represents a connection to a backend server from the proxy for a client.

Datei anzeigen

@ -4,5 +4,9 @@ package com.velocitypowered.api.proxy.messages;
* Represents a kind of channel identifier.
*/
public interface ChannelIdentifier {
/**
* Returns the textual representation of this identifier.
* @return the textual representation of the identifier
*/
String getId();
}

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides an interface to receive, handle, and send plugin messages on the proxy from clients and servers.
*/
package com.velocitypowered.api.proxy.messages;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides an interface to interact with the proxy at a low level.
*/
package com.velocitypowered.api.proxy;

Datei anzeigen

@ -1,4 +1,4 @@
package com.velocitypowered.api.server;
package com.velocitypowered.api.proxy.server;
import com.google.common.base.Preconditions;
import org.checkerframework.checker.nullness.qual.NonNull;

Datei anzeigen

@ -1,7 +1,8 @@
package com.velocitypowered.api.server;
package com.velocitypowered.api.proxy.server;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.util.Favicon;
import net.kyori.text.Component;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@ -65,6 +66,9 @@ public class ServerPing {
return new Builder();
}
/**
* A builder for {@link ServerPing} objects.
*/
public static class Builder {
private Version version;
private int onlinePlayers;

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides utilities to handle server information.
*/
package com.velocitypowered.api.proxy.server;

Datei anzeigen

@ -6,17 +6,50 @@ import java.util.concurrent.TimeUnit;
* Represents a scheduler to execute tasks on the proxy.
*/
public interface Scheduler {
/**
* Initializes a new {@link TaskBuilder} for creating a task on the proxy.
* @param plugin the plugin to request the task for
* @param runnable the task to run when scheduled
* @return the task builder
*/
TaskBuilder buildTask(Object plugin, Runnable runnable);
/**
* Represents a fluent interface to schedule tasks on the proxy.
*/
interface TaskBuilder {
/**
* Specifies that the task should delay its execution by the specified amount of time.
* @param time the time to delay by
* @param unit the unit of time for {@code time}
* @return this builder, for chaining
*/
TaskBuilder delay(int time, TimeUnit unit);
/**
* Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.
* @param time the time to delay by
* @param unit the unit of time for {@code time}
* @return this builder, for chaining
*/
TaskBuilder repeat(int time, TimeUnit unit);
/**
* Clears the delay on this task.
* @return this builder, for chaining
*/
TaskBuilder clearDelay();
/**
* Clears the repeat interval on this task.
* @return this builder, for chaining
*/
TaskBuilder clearRepeat();
/**
* Schedules this task for execution.
* @return the scheduled task
*/
ScheduledTask schedule();
}
}

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides utilities for scheduling tasks with a fluent builder.
*/
package com.velocitypowered.api.scheduler;

Datei anzeigen

@ -1,4 +1,4 @@
package com.velocitypowered.api.server;
package com.velocitypowered.api.util;
import com.google.common.base.Preconditions;
import org.checkerframework.checker.nullness.qual.NonNull;

Datei anzeigen

@ -8,9 +8,9 @@ import java.util.List;
import java.util.UUID;
/**
* Represents a Mojang game profile.
* Represents a Mojang game profile. This class is immutable.
*/
public class GameProfile {
public final class GameProfile {
private final String id;
private final String name;
private final List<Property> properties;
@ -37,6 +37,11 @@ public class GameProfile {
return properties;
}
/**
* Creates a game profile suitable for use in offline-mode.
* @param username the username to use
* @return the new offline-mode game profile
*/
public static GameProfile forOfflinePlayer(@NonNull String username) {
Preconditions.checkNotNull(username, "username");
String id = UuidUtils.toUndashed(UuidUtils.generateOfflinePlayerUuid(username));
@ -52,7 +57,7 @@ public class GameProfile {
'}';
}
public class Property {
public final class Property {
private final String name;
private final String value;
private final String signature;

Datei anzeigen

@ -7,11 +7,19 @@ import java.nio.charset.StandardCharsets;
import java.util.Objects;
import java.util.UUID;
/**
* Provides a small, useful selection of utilities for working with Minecraft UUIDs.
*/
public class UuidUtils {
private UuidUtils() {
throw new AssertionError();
}
/**
* Converts from an undashed Mojang-style UUID into a Java {@link UUID} object.
* @param string the string to convert
* @return the UUID object
*/
public static @NonNull UUID fromUndashed(final @NonNull String string) {
Objects.requireNonNull(string, "string");
Preconditions.checkArgument(string.length() == 32, "Length is incorrect");
@ -21,11 +29,21 @@ public class UuidUtils {
);
}
/**
* Converts from a Java {@link UUID} object into an undashed Mojang-style UUID.
* @param uuid the UUID to convert
* @return the undashed UUID
*/
public static @NonNull String toUndashed(final @NonNull UUID uuid) {
Preconditions.checkNotNull(uuid, "uuid");
return Long.toUnsignedString(uuid.getMostSignificantBits(), 16) + Long.toUnsignedString(uuid.getLeastSignificantBits(), 16);
}
/**
* Generates a UUID for use for offline mode.
* @param username the username to use
* @return the offline mode UUID
*/
public static @NonNull UUID generateOfflinePlayerUuid(@NonNull String username) {
return UUID.nameUUIDFromBytes(("OfflinePlayer:" + username).getBytes(StandardCharsets.UTF_8));
}

Datei anzeigen

@ -0,0 +1,4 @@
/**
* Provides a selection of miscellaneous utilities for use by plugins and the proxy.
*/
package com.velocitypowered.api.util;

Datei anzeigen

@ -10,10 +10,10 @@ import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
import com.velocitypowered.api.event.proxy.ProxyShutdownEvent;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.server.Favicon;
import com.velocitypowered.api.util.Favicon;
import com.velocitypowered.api.plugin.PluginManager;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.network.ConnectionManager;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.proxy.network.ConnectionManager;
import com.velocitypowered.proxy.command.ServerCommand;
import com.velocitypowered.proxy.command.ShutdownCommand;
import com.velocitypowered.proxy.command.VelocityCommand;

Datei anzeigen

@ -4,7 +4,7 @@ import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.command.Command;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.proxy.VelocityServer;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;

Datei anzeigen

@ -2,7 +2,7 @@ package com.velocitypowered.proxy.config;
import com.google.common.collect.ImmutableMap;
import com.moandjiezana.toml.Toml;
import com.velocitypowered.api.server.Favicon;
import com.velocitypowered.api.util.Favicon;
import com.velocitypowered.proxy.util.AddressUtil;
import com.velocitypowered.api.util.LegacyChatColorUtils;
import io.netty.buffer.ByteBufUtil;

Datei anzeigen

@ -24,14 +24,14 @@ import javax.crypto.spec.SecretKeySpec;
import java.security.GeneralSecurityException;
import static com.velocitypowered.network.Connections.CIPHER_DECODER;
import static com.velocitypowered.network.Connections.CIPHER_ENCODER;
import static com.velocitypowered.network.Connections.COMPRESSION_DECODER;
import static com.velocitypowered.network.Connections.COMPRESSION_ENCODER;
import static com.velocitypowered.network.Connections.FRAME_DECODER;
import static com.velocitypowered.network.Connections.FRAME_ENCODER;
import static com.velocitypowered.network.Connections.MINECRAFT_DECODER;
import static com.velocitypowered.network.Connections.MINECRAFT_ENCODER;
import static com.velocitypowered.proxy.network.Connections.CIPHER_DECODER;
import static com.velocitypowered.proxy.network.Connections.CIPHER_ENCODER;
import static com.velocitypowered.proxy.network.Connections.COMPRESSION_DECODER;
import static com.velocitypowered.proxy.network.Connections.COMPRESSION_ENCODER;
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
/**
* A utility class to make working with the pipeline a little less painful and transparently handles certain Minecraft

Datei anzeigen

@ -2,7 +2,6 @@ package com.velocitypowered.proxy.connection.backend;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.ConnectionRequestBuilder;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ServerConnection;
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
import com.velocitypowered.proxy.config.PlayerInfoForwarding;
@ -17,7 +16,7 @@ import com.velocitypowered.proxy.protocol.packet.PluginMessage;
import com.velocitypowered.proxy.protocol.packet.ServerLogin;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.protocol.StateRegistry;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
import io.netty.channel.*;
@ -27,13 +26,13 @@ import io.netty.util.AttributeKey;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import static com.velocitypowered.network.Connections.FRAME_DECODER;
import static com.velocitypowered.network.Connections.FRAME_ENCODER;
import static com.velocitypowered.network.Connections.HANDLER;
import static com.velocitypowered.network.Connections.MINECRAFT_DECODER;
import static com.velocitypowered.network.Connections.MINECRAFT_ENCODER;
import static com.velocitypowered.network.Connections.READ_TIMEOUT;
import static com.velocitypowered.network.Connections.SERVER_READ_TIMEOUT_SECONDS;
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
import static com.velocitypowered.proxy.network.Connections.HANDLER;
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
import static com.velocitypowered.proxy.network.Connections.SERVER_READ_TIMEOUT_SECONDS;
public class VelocityServerConnection implements MinecraftConnectionAssociation, ServerConnection {
static final AttributeKey<CompletableFuture<ConnectionRequestBuilder.Result>> CONNECTION_NOTIFIER =

Datei anzeigen

@ -21,7 +21,7 @@ import com.velocitypowered.proxy.connection.backend.VelocityServerConnection;
import com.velocitypowered.proxy.protocol.packet.ClientSettings;
import com.velocitypowered.proxy.protocol.packet.PluginMessage;
import com.velocitypowered.proxy.util.ThrowableUtils;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.proxy.protocol.packet.Disconnect;
import com.velocitypowered.proxy.protocol.packet.HeaderAndFooter;

Datei anzeigen

@ -9,7 +9,7 @@ import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.config.VelocityConfiguration;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.proxy.connection.MinecraftSessionHandler;
import com.velocitypowered.api.server.ServerPing;
import com.velocitypowered.api.proxy.server.ServerPing;
import com.velocitypowered.proxy.protocol.MinecraftPacket;
import com.velocitypowered.proxy.protocol.ProtocolConstants;
import com.velocitypowered.proxy.protocol.StateRegistry;

Datei anzeigen

@ -5,9 +5,9 @@ import com.velocitypowered.api.event.connection.LoginEvent;
import com.velocitypowered.api.event.connection.PreLoginEvent;
import com.velocitypowered.api.event.connection.PreLoginEvent.PreLoginComponentResult;
import com.velocitypowered.api.event.permission.PermissionsSetupEvent;
import com.velocitypowered.api.event.player.gameprofile.GameProfileRequestEvent;
import com.velocitypowered.api.event.player.GameProfileRequestEvent;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import com.velocitypowered.proxy.connection.VelocityConstants;
import com.velocitypowered.api.util.GameProfile;
import com.velocitypowered.proxy.protocol.MinecraftPacket;

Datei anzeigen

@ -12,7 +12,7 @@ import com.velocitypowered.proxy.protocol.packet.StatusPing;
import com.velocitypowered.proxy.protocol.packet.StatusRequest;
import com.velocitypowered.proxy.protocol.packet.StatusResponse;
import com.velocitypowered.proxy.connection.MinecraftConnection;
import com.velocitypowered.api.server.ServerPing;
import com.velocitypowered.api.proxy.server.ServerPing;
import com.velocitypowered.proxy.connection.MinecraftSessionHandler;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;

Datei anzeigen

@ -1,4 +1,4 @@
package com.velocitypowered.network;
package com.velocitypowered.proxy.network;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.velocitypowered.natives.util.Natives;
@ -44,14 +44,7 @@ import java.util.Set;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import static com.velocitypowered.network.Connections.CLIENT_READ_TIMEOUT_SECONDS;
import static com.velocitypowered.network.Connections.FRAME_DECODER;
import static com.velocitypowered.network.Connections.FRAME_ENCODER;
import static com.velocitypowered.network.Connections.LEGACY_PING_DECODER;
import static com.velocitypowered.network.Connections.LEGACY_PING_ENCODER;
import static com.velocitypowered.network.Connections.MINECRAFT_DECODER;
import static com.velocitypowered.network.Connections.MINECRAFT_ENCODER;
import static com.velocitypowered.network.Connections.READ_TIMEOUT;
import static com.velocitypowered.proxy.network.Connections.*;
public final class ConnectionManager {
private static final Logger logger = LogManager.getLogger(ConnectionManager.class);

Datei anzeigen

@ -1,4 +1,4 @@
package com.velocitypowered.network;
package com.velocitypowered.proxy.network;
public interface Connections {
String CIPHER_DECODER = "cipher-decoder";

Datei anzeigen

@ -1,6 +1,6 @@
package com.velocitypowered.proxy.protocol.packet;
import com.velocitypowered.api.server.ServerPing;
import com.velocitypowered.api.proxy.server.ServerPing;
import net.kyori.text.serializer.ComponentSerializers;
public class LegacyPingResponse {

Datei anzeigen

@ -1,7 +1,7 @@
package com.velocitypowered.proxy.protocol.util;
import com.google.gson.*;
import com.velocitypowered.api.server.Favicon;
import com.velocitypowered.api.util.Favicon;
import java.lang.reflect.Type;

Datei anzeigen

@ -2,7 +2,7 @@ package com.velocitypowered.proxy.util;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import java.util.*;
import java.util.concurrent.locks.ReadWriteLock;

Datei anzeigen

@ -1,6 +1,6 @@
package com.velocitypowered.proxy.util;
import com.velocitypowered.api.server.ServerInfo;
import com.velocitypowered.api.proxy.server.ServerInfo;
import org.junit.jupiter.api.Test;
import java.net.InetAddress;