Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Adjust for recent adventure API changes.
Dieser Commit ist enthalten in:
Ursprung
209291e702
Commit
86259f788f
@ -17,14 +17,14 @@ import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import net.kyori.adventure.audience.MultiAudience;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* Provides an interface to a Minecraft server proxy.
|
||||
*/
|
||||
public interface ProxyServer extends MultiAudience {
|
||||
public interface ProxyServer extends Audience {
|
||||
|
||||
/**
|
||||
* Retrieves the player currently connected to this proxy by their Minecraft username. The search
|
||||
|
@ -1,18 +1,17 @@
|
||||
package com.velocitypowered.api.proxy.server;
|
||||
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import com.velocitypowered.api.proxy.ProxyAudience;
|
||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import net.kyori.adventure.audience.MultiAudience;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
|
||||
/**
|
||||
* Represents a server that has been registered with the proxy. The {@code Audience} associated with
|
||||
* a {@code RegisteredServer} represent all players on the server connected to this proxy and do not
|
||||
* interact with the server in any way.
|
||||
*/
|
||||
public interface RegisteredServer extends ChannelMessageSink, MultiAudience {
|
||||
public interface RegisteredServer extends ChannelMessageSink, Audience {
|
||||
|
||||
/**
|
||||
* Returns the {@link ServerInfo} for this server.
|
||||
|
@ -72,6 +72,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.IntFunction;
|
||||
import java.util.stream.Collectors;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.audience.ForwardingAudience;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.TranslatableComponent;
|
||||
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
@ -84,7 +85,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class VelocityServer implements ProxyServer {
|
||||
public class VelocityServer implements ProxyServer, ForwardingAudience {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(VelocityServer.class);
|
||||
public static final Gson GENERAL_GSON = new GsonBuilder()
|
||||
|
@ -38,11 +38,12 @@ import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.audience.ForwardingAudience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class VelocityRegisteredServer implements RegisteredServer {
|
||||
public class VelocityRegisteredServer implements RegisteredServer, ForwardingAudience {
|
||||
|
||||
private final @Nullable VelocityServer server;
|
||||
private final ServerInfo serverInfo;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren