Rearrange connection-related API classes.

This is the last rearrangement I plan to do.
This commit is contained in:
Andrew Steinborn
2020-10-22 02:31:29 -04:00
parent b7f0eab471
commit 973503ff99
41 changed files with 55 additions and 70 deletions

View File

@@ -1,10 +1,6 @@
package com.velocitypowered.api.command;
import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.proxy.Player;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.checkerframework.checker.nullness.qual.NonNull;
import com.velocitypowered.api.proxy.connection.Player;
/**
* Represents a command that can be executed by a {@link CommandSource}

View File

@@ -1,4 +1,4 @@
package com.velocitypowered.api.proxy;
package com.velocitypowered.api.command;
import com.velocitypowered.api.command.CommandSource;

View File

@@ -4,7 +4,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.annotations.Beta;
import com.mojang.brigadier.tree.RootCommandNode;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
/**
* Allows plugins to modify the packet indicating commands available on the server to a

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.connection;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.connection.InboundConnection;
/**
* This event is fired when a handshake is established between a client and the proxy.

View File

@@ -4,8 +4,8 @@ import com.google.common.base.Preconditions;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;
import com.velocitypowered.api.event.ResultedEvent;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ServerConnection;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.connection.ServerConnection;
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.connection;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.connection.InboundConnection;
import com.velocitypowered.api.proxy.server.ServerPing;
/**

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
/**
* This event is fired when a player disconnects from the proxy. Operations on the provided player,

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.connection.InboundConnection;
import com.velocitypowered.api.util.GameProfile;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -2,7 +2,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.proxy.connection.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.util.Optional;
import net.kyori.adventure.text.Component;

View File

@@ -2,7 +2,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.proxy.connection.Player;
/**
* This event is fired once the player has been authenticated but before they connect to a server on

View File

@@ -2,7 +2,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.proxy.connection.Player;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.util.ModInfo;
/**

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
/**
* This event is fired when the status of a resource pack sent to the player by the server is

View File

@@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.player.PlayerSettings;
public final class PlayerSettingsChangedEvent {

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
/**
* This event is fired once the player has been fully initialized and is about to connect to their

View File

@@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.event.ResultedEvent;
import com.velocitypowered.api.proxy.InboundConnection;
import com.velocitypowered.api.proxy.connection.InboundConnection;
import java.util.Optional;
import net.kyori.adventure.text.Component;
import org.checkerframework.checker.nullness.qual.NonNull;

View File

@@ -1,7 +1,7 @@
package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -2,9 +2,9 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.event.ResultedEvent;
import com.velocitypowered.api.proxy.ConnectionRequestBuilder;
import com.velocitypowered.api.proxy.ConnectionRequestBuilder.Status;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.player.ConnectionRequestBuilder;
import com.velocitypowered.api.proxy.player.ConnectionRequestBuilder.Status;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.Nullable;

View File

@@ -2,7 +2,7 @@ package com.velocitypowered.api.event.player;
import static com.google.common.base.Preconditions.checkNotNull;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import java.util.ArrayList;
import java.util.List;

View File

@@ -2,9 +2,11 @@ package com.velocitypowered.api.proxy;
import com.velocitypowered.api.command.CommandManager;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.command.ConsoleCommandSource;
import com.velocitypowered.api.event.EventManager;
import com.velocitypowered.api.plugin.PluginManager;
import com.velocitypowered.api.proxy.config.ProxyConfig;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.messages.ChannelRegistrar;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import com.velocitypowered.api.proxy.server.ServerInfo;

View File

@@ -1,4 +1,4 @@
package com.velocitypowered.api.proxy;
package com.velocitypowered.api.proxy.connection;
import com.velocitypowered.api.network.ProtocolVersion;

View File

@@ -1,9 +1,10 @@
package com.velocitypowered.api.proxy;
package com.velocitypowered.api.proxy.connection;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.event.player.PlayerResourcePackStatusEvent;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
import com.velocitypowered.api.proxy.player.ConnectionRequestBuilder;
import com.velocitypowered.api.proxy.player.PlayerSettings;
import com.velocitypowered.api.proxy.player.TabList;
import com.velocitypowered.api.proxy.server.RegisteredServer;
@@ -78,15 +79,6 @@ public interface Player extends CommandSource, Identified, InboundConnection,
*/
ConnectionRequestBuilder createConnectionRequest(RegisteredServer server);
/**
* Gets the player's profile properties.
*
* <p>The returned list may be unmodifiable.</p>
*
* @return the player's profile properties
*/
List<GameProfile.Property> getGameProfileProperties();
/**
* Sets the player's profile properties.
*

View File

@@ -1,4 +1,4 @@
package com.velocitypowered.api.proxy;
package com.velocitypowered.api.proxy.connection;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;

View File

@@ -1,5 +1,6 @@
package com.velocitypowered.api.proxy;
package com.velocitypowered.api.proxy.player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;

View File

@@ -1,6 +1,6 @@
package com.velocitypowered.api.proxy.player;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.util.GameProfile;
import java.util.Collection;
import java.util.Optional;

View File

@@ -1,6 +1,6 @@
package com.velocitypowered.api.proxy.server;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.connection.Player;
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;