mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Optimize imports
This commit is contained in:
parent
400f1b48a0
commit
beb00d647f
213 changed files with 710 additions and 605 deletions
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.network.example;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class PingPacket implements Packet {
|
||||
private final String id;
|
||||
|
|
|
@ -16,7 +16,7 @@ public class PingServerTest {
|
|||
KeyGenerator gen = KeyGenerator.getInstance("AES");
|
||||
gen.init(128);
|
||||
key = gen.generateKey();
|
||||
} catch(NoSuchAlgorithmException e) {
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
System.err.println("AES algorithm not supported, exiting...");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.geysermc.mcprotocollib.network.example;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.Server;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper;
|
||||
|
@ -11,7 +12,6 @@ import org.geysermc.mcprotocollib.network.crypt.PacketEncryption;
|
|||
import org.geysermc.mcprotocollib.network.packet.DefaultPacketHeader;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketHeader;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import java.security.GeneralSecurityException;
|
||||
|
|
|
@ -5,22 +5,9 @@ import com.github.steveice10.mc.auth.exception.request.RequestException;
|
|||
import com.github.steveice10.mc.auth.service.AuthenticationService;
|
||||
import com.github.steveice10.mc.auth.service.MojangAuthenticationService;
|
||||
import com.github.steveice10.mc.auth.service.SessionService;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftConstants;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
|
||||
import org.geysermc.mcprotocollib.protocol.ServerLoginHandler;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodec;
|
||||
import org.geysermc.mcprotocollib.protocol.data.ProtocolState;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.PlayerInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.VersionInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerInfoBuilder;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerInfoHandler;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerPingTimeHandler;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.format.TextDecoration;
|
||||
import org.geysermc.mcprotocollib.network.ProxyInfo;
|
||||
import org.geysermc.mcprotocollib.network.Server;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
|
@ -33,9 +20,18 @@ import org.geysermc.mcprotocollib.network.event.session.SessionAdapter;
|
|||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.tcp.TcpClientSession;
|
||||
import org.geysermc.mcprotocollib.network.tcp.TcpServer;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.format.TextDecoration;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftConstants;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodec;
|
||||
import org.geysermc.mcprotocollib.protocol.data.ProtocolState;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.PlayerInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.VersionInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket;
|
||||
|
||||
import java.net.Proxy;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
package org.geysermc.mcprotocollib.network;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.event.server.*;
|
||||
import org.geysermc.mcprotocollib.network.event.server.ServerBoundEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.server.ServerClosedEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.server.ServerClosingEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.server.ServerEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.server.ServerListener;
|
||||
import org.geysermc.mcprotocollib.network.event.server.SessionAddedEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.server.SessionRemovedEvent;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public abstract class AbstractServer implements Server {
|
||||
|
@ -59,13 +69,13 @@ public abstract class AbstractServer implements Server {
|
|||
@Override
|
||||
public <T> T getGlobalFlag(Flag<T> flag, T def) {
|
||||
Object value = this.flags.get(flag.key());
|
||||
if(value == null) {
|
||||
if (value == null) {
|
||||
return def;
|
||||
}
|
||||
|
||||
try {
|
||||
return flag.cast(value);
|
||||
} catch(ClassCastException e) {
|
||||
} catch (ClassCastException e) {
|
||||
throw new IllegalStateException("Tried to get flag \"" + flag.key() + "\" as the wrong type. Actual type: " + value.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +101,7 @@ public abstract class AbstractServer implements Server {
|
|||
}
|
||||
|
||||
protected void callEvent(ServerEvent event) {
|
||||
for(ServerListener listener : this.listeners) {
|
||||
for (ServerListener listener : this.listeners) {
|
||||
event.call(listener);
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +118,7 @@ public abstract class AbstractServer implements Server {
|
|||
|
||||
public void removeSession(Session session) {
|
||||
this.sessions.remove(session);
|
||||
if(session.isConnected()) {
|
||||
if (session.isConnected()) {
|
||||
session.disconnect("Connection closed.");
|
||||
}
|
||||
|
||||
|
@ -129,7 +139,7 @@ public abstract class AbstractServer implements Server {
|
|||
public AbstractServer bind(boolean wait, Runnable callback) {
|
||||
this.bindImpl(wait, () -> {
|
||||
callEvent(new ServerBoundEvent(AbstractServer.this));
|
||||
if(callback != null) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
});
|
||||
|
@ -152,15 +162,15 @@ public abstract class AbstractServer implements Server {
|
|||
@Override
|
||||
public void close(boolean wait, Runnable callback) {
|
||||
this.callEvent(new ServerClosingEvent(this));
|
||||
for(Session session : this.getSessions()) {
|
||||
if(session.isConnected()) {
|
||||
for (Session session : this.getSessions()) {
|
||||
if (session.isConnected()) {
|
||||
session.disconnect("Server closed.");
|
||||
}
|
||||
}
|
||||
|
||||
this.closeImpl(wait, () -> {
|
||||
callEvent(new ServerClosedEvent(AbstractServer.this));
|
||||
if(callback != null) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.geysermc.mcprotocollib.network;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.crypt.PacketEncryption;
|
||||
import org.geysermc.mcprotocollib.network.event.session.SessionEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.session.SessionListener;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.codec;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
|
||||
/**
|
||||
* Represents a definition of a packet with various
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.codec;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
|
||||
public interface PacketSerializer<T extends Packet, H extends PacketCodecHelper> {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.event.session;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
|
||||
/**
|
||||
* Called when the session is disconnected.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.event.session;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
|
||||
/**
|
||||
* Called when the session is about to disconnect.
|
||||
|
|
|
@ -42,7 +42,7 @@ public class PacketSendingEvent implements SessionEvent {
|
|||
public <T extends Packet> T getPacket() {
|
||||
try {
|
||||
return (T) this.packet;
|
||||
} catch(ClassCastException e) {
|
||||
} catch (ClassCastException e) {
|
||||
throw new IllegalStateException("Tried to get packet as the wrong type. Actual type: " + this.packet.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.event.session;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
|
||||
/**
|
||||
* An adapter for picking session events to listen for.
|
||||
|
|
|
@ -10,7 +10,8 @@ public class TransportHelper {
|
|||
}
|
||||
|
||||
public static TransportMethod determineTransportMethod() {
|
||||
if (isClassAvailable("io.netty.incubator.channel.uring.IOUring") && IOUring.isAvailable()) return TransportMethod.IO_URING;
|
||||
if (isClassAvailable("io.netty.incubator.channel.uring.IOUring") && IOUring.isAvailable())
|
||||
return TransportMethod.IO_URING;
|
||||
if (isClassAvailable("io.netty.channel.epoll.Epoll") && Epoll.isAvailable()) return TransportMethod.EPOLL;
|
||||
if (isClassAvailable("io.netty.channel.kqueue.KQueue") && KQueue.isAvailable()) return TransportMethod.KQUEUE;
|
||||
return TransportMethod.NIO;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.network.packet;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketSerializer;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class BufferedPacket implements Packet, PacketSerializer<BufferedPacket, PacketCodecHelper> {
|
||||
private final Class<? extends Packet> packetClass;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.packet;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
|
||||
/**
|
||||
* The default packet header, using a varint packet length and id.
|
||||
|
@ -19,13 +19,13 @@ public class DefaultPacketHeader implements PacketHeader {
|
|||
|
||||
@Override
|
||||
public int getLengthSize(int length) {
|
||||
if((length & -128) == 0) {
|
||||
if ((length & -128) == 0) {
|
||||
return 1;
|
||||
} else if((length & -16384) == 0) {
|
||||
} else if ((length & -16384) == 0) {
|
||||
return 2;
|
||||
} else if((length & -2097152) == 0) {
|
||||
} else if ((length & -2097152) == 0) {
|
||||
return 3;
|
||||
} else if((length & -268435456) == 0) {
|
||||
} else if ((length & -268435456) == 0) {
|
||||
return 4;
|
||||
} else {
|
||||
return 5;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.network.packet;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
|
||||
/**
|
||||
* The header of a protocol's packets.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.geysermc.mcprotocollib.network.packet;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketSerializer;
|
||||
import org.geysermc.mcprotocollib.network.Server;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import org.geysermc.mcprotocollib.network.Server;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketSerializer;
|
||||
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
|
@ -166,7 +166,7 @@ public abstract class PacketProtocol {
|
|||
*/
|
||||
public int getClientboundId(Class<? extends Packet> packetClass) {
|
||||
Integer packetId = this.clientboundIds.get(packetClass);
|
||||
if(packetId == null) {
|
||||
if (packetId == null) {
|
||||
throw new IllegalArgumentException("Unregistered clientbound packet class: " + packetClass.getName());
|
||||
}
|
||||
|
||||
|
@ -190,6 +190,7 @@ public abstract class PacketProtocol {
|
|||
|
||||
/**
|
||||
* Gets the packet class for a packet id.
|
||||
*
|
||||
* @param id The packet id.
|
||||
* @return The registered packet's class
|
||||
* @throws IllegalArgumentException If the packet ID is not registered.
|
||||
|
@ -255,6 +256,7 @@ public abstract class PacketProtocol {
|
|||
|
||||
/**
|
||||
* Gets the packet class for a packet id.
|
||||
*
|
||||
* @param id The packet id.
|
||||
* @return The registered packet's class
|
||||
* @throws IllegalArgumentException If the packet ID is not registered.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBundlePacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundDelimiterPacket;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.BuiltinFlags;
|
||||
import org.geysermc.mcprotocollib.network.ProxyInfo;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.helper.TransportHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.AddressedEnvelope;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelException;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.epoll.EpollDatagramChannel;
|
||||
import io.netty.channel.epoll.EpollEventLoopGroup;
|
||||
import io.netty.channel.epoll.EpollSocketChannel;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.DatagramChannel;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.kqueue.KQueueDatagramChannel;
|
||||
import io.netty.channel.kqueue.KQueueEventLoopGroup;
|
||||
import io.netty.channel.kqueue.KQueueSocketChannel;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.DatagramChannel;
|
||||
import io.netty.channel.socket.nio.NioDatagramChannel;
|
||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||
import io.netty.handler.codec.dns.DefaultDnsQuestion;
|
||||
|
@ -38,8 +42,16 @@ import io.netty.incubator.channel.uring.IOUringSocketChannel;
|
|||
import io.netty.resolver.dns.DnsNameResolver;
|
||||
import io.netty.resolver.dns.DnsNameResolverBuilder;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import org.geysermc.mcprotocollib.network.BuiltinFlags;
|
||||
import org.geysermc.mcprotocollib.network.ProxyInfo;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.helper.TransportHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
|
||||
import java.net.*;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -82,7 +94,7 @@ public class TcpClientSession extends TcpSession {
|
|||
|
||||
@Override
|
||||
public void connect(boolean wait, boolean transferring) {
|
||||
if(this.disconnected) {
|
||||
if (this.disconnected) {
|
||||
throw new IllegalStateException("Session has already been disconnected.");
|
||||
}
|
||||
|
||||
|
@ -144,7 +156,7 @@ public class TcpClientSession extends TcpSession {
|
|||
exceptionCaught(null, futureListener.cause());
|
||||
}
|
||||
});
|
||||
} catch(Throwable t) {
|
||||
} catch (Throwable t) {
|
||||
exceptionCaught(null, t);
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +174,7 @@ public class TcpClientSession extends TcpSession {
|
|||
System.out.println("[PacketLib] Attempting SRV lookup for \"" + name + "\".");
|
||||
}
|
||||
|
||||
if(getFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, true) && (!this.host.matches(IP_REGEX) && !this.host.equalsIgnoreCase("localhost"))) {
|
||||
if (getFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, true) && (!this.host.matches(IP_REGEX) && !this.host.equalsIgnoreCase("localhost"))) {
|
||||
AddressedEnvelope<DnsResponse, InetSocketAddress> envelope = null;
|
||||
try (DnsNameResolver resolver = new DnsNameResolverBuilder(EVENT_LOOP_GROUP.next())
|
||||
.channelType(DATAGRAM_CHANNEL_CLASS)
|
||||
|
@ -205,7 +217,7 @@ public class TcpClientSession extends TcpSession {
|
|||
}
|
||||
|
||||
}
|
||||
} else if(debug) {
|
||||
} else if (debug) {
|
||||
System.out.println("[PacketLib] Not resolving SRV record for " + this.host);
|
||||
}
|
||||
|
||||
|
@ -226,7 +238,7 @@ public class TcpClientSession extends TcpSession {
|
|||
}
|
||||
|
||||
private void addProxy(ChannelPipeline pipeline) {
|
||||
if(proxy != null) {
|
||||
if (proxy != null) {
|
||||
switch (proxy.getType()) {
|
||||
case HTTP -> {
|
||||
if (proxy.isAuthenticated()) {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ByteToMessageCodec;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.event.session.PacketErrorEvent;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ByteToMessageCodec;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ByteToMessageCodec;
|
||||
import io.netty.handler.codec.DecoderException;
|
||||
import io.netty.handler.codec.EncoderException;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.zip.Deflater;
|
||||
|
@ -40,7 +40,7 @@ public class TcpPacketCompression extends ByteToMessageCodec<ByteBuf> {
|
|||
if (readable > MAX_UNCOMPRESSED_SIZE) {
|
||||
throw new EncoderException("Packet too big: size of " + readable + " is larger than the protocol maximum of " + MAX_UNCOMPRESSED_SIZE + ".");
|
||||
}
|
||||
if(readable < this.session.getCompressionThreshold()) {
|
||||
if (readable < this.session.getCompressionThreshold()) {
|
||||
this.session.getCodecHelper().writeVarInt(out, 0);
|
||||
out.writeBytes(in);
|
||||
} else {
|
||||
|
@ -49,7 +49,7 @@ public class TcpPacketCompression extends ByteToMessageCodec<ByteBuf> {
|
|||
this.session.getCodecHelper().writeVarInt(out, bytes.length);
|
||||
this.deflater.setInput(bytes, 0, readable);
|
||||
this.deflater.finish();
|
||||
while(!this.deflater.finished()) {
|
||||
while (!this.deflater.finished()) {
|
||||
int length = this.deflater.deflate(this.buf);
|
||||
out.writeBytes(this.buf, 0, length);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.crypt.PacketEncryption;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ByteToMessageCodec;
|
||||
import org.geysermc.mcprotocollib.network.crypt.PacketEncryption;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -21,7 +21,7 @@ public class TcpPacketEncryptor extends ByteToMessageCodec<ByteBuf> {
|
|||
int length = in.readableBytes();
|
||||
byte[] bytes = this.getBytes(in);
|
||||
int outLength = this.encryption.getEncryptOutputSize(length);
|
||||
if( this.encryptedArray.length < outLength) {
|
||||
if (this.encryptedArray.length < outLength) {
|
||||
this.encryptedArray = new byte[outLength];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ByteToMessageCodec;
|
||||
import io.netty.handler.codec.CorruptedFrameException;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.AbstractServer;
|
||||
import org.geysermc.mcprotocollib.network.BuiltinFlags;
|
||||
import org.geysermc.mcprotocollib.network.helper.TransportHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelException;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.epoll.EpollEventLoopGroup;
|
||||
import io.netty.channel.epoll.EpollServerSocketChannel;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.kqueue.KQueueEventLoopGroup;
|
||||
import io.netty.channel.kqueue.KQueueServerSocketChannel;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
|
@ -16,6 +19,10 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
|
|||
import io.netty.incubator.channel.uring.IOUringEventLoopGroup;
|
||||
import io.netty.incubator.channel.uring.IOUringServerSocketChannel;
|
||||
import io.netty.util.concurrent.Future;
|
||||
import org.geysermc.mcprotocollib.network.AbstractServer;
|
||||
import org.geysermc.mcprotocollib.network.BuiltinFlags;
|
||||
import org.geysermc.mcprotocollib.network.helper.TransportHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.function.Supplier;
|
||||
|
@ -36,7 +43,7 @@ public class TcpServer extends AbstractServer {
|
|||
|
||||
@Override
|
||||
public void bindImpl(boolean wait, final Runnable callback) {
|
||||
if(this.group != null || this.channel != null) {
|
||||
if (this.group != null || this.channel != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -89,26 +96,26 @@ public class TcpServer extends AbstractServer {
|
|||
}
|
||||
}).group(this.group).localAddress(this.getHost(), this.getPort()).bind();
|
||||
|
||||
if(wait) {
|
||||
if (wait) {
|
||||
try {
|
||||
future.sync();
|
||||
} catch(InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
|
||||
channel = future.channel();
|
||||
if(callback != null) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
} else {
|
||||
future.addListener((ChannelFutureListener) future1 -> {
|
||||
if(future1.isSuccess()) {
|
||||
if (future1.isSuccess()) {
|
||||
channel = future1.channel();
|
||||
if(callback != null) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
} else {
|
||||
System.err.println("[ERROR] Failed to asynchronously bind connection listener.");
|
||||
if(future1.cause() != null) {
|
||||
if (future1.cause() != null) {
|
||||
future1.cause().printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -118,27 +125,27 @@ public class TcpServer extends AbstractServer {
|
|||
|
||||
@Override
|
||||
public void closeImpl(boolean wait, final Runnable callback) {
|
||||
if(this.channel != null) {
|
||||
if(this.channel.isOpen()) {
|
||||
if (this.channel != null) {
|
||||
if (this.channel.isOpen()) {
|
||||
ChannelFuture future = this.channel.close();
|
||||
if(wait) {
|
||||
if (wait) {
|
||||
try {
|
||||
future.sync();
|
||||
} catch(InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
|
||||
if(callback != null) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
} else {
|
||||
future.addListener((ChannelFutureListener) future1 -> {
|
||||
if(future1.isSuccess()) {
|
||||
if(callback != null) {
|
||||
if (future1.isSuccess()) {
|
||||
if (callback != null) {
|
||||
callback.run();
|
||||
}
|
||||
} else {
|
||||
System.err.println("[ERROR] Failed to asynchronously close connection listener.");
|
||||
if(future1.cause() != null) {
|
||||
if (future1.cause() != null) {
|
||||
future1.cause().printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -149,18 +156,18 @@ public class TcpServer extends AbstractServer {
|
|||
this.channel = null;
|
||||
}
|
||||
|
||||
if(this.group != null) {
|
||||
if (this.group != null) {
|
||||
Future<?> future = this.group.shutdownGracefully();
|
||||
if(wait) {
|
||||
if (wait) {
|
||||
try {
|
||||
future.sync();
|
||||
} catch(InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
} else {
|
||||
future.addListener(future1 -> {
|
||||
if(!future1.isSuccess() && getGlobalFlag(BuiltinFlags.PRINT_DEBUG, false)) {
|
||||
if (!future1.isSuccess() && getGlobalFlag(BuiltinFlags.PRINT_DEBUG, false)) {
|
||||
System.err.println("[ERROR] Failed to asynchronously close connection listener.");
|
||||
if(future1.cause() != null) {
|
||||
if (future1.cause() != null) {
|
||||
future1.cause().printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import org.geysermc.mcprotocollib.network.Flag;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -33,7 +33,7 @@ public class TcpServerSession extends TcpSession {
|
|||
|
||||
@Override
|
||||
public boolean hasFlag(Flag<?> flag) {
|
||||
if(super.hasFlag(flag)) {
|
||||
if (super.hasFlag(flag)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class TcpServerSession extends TcpSession {
|
|||
@Override
|
||||
public <T> T getFlag(Flag<T> flag, T def) {
|
||||
T ret = super.getFlag(flag, null);
|
||||
if(ret != null) {
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
package org.geysermc.mcprotocollib.network.tcp;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ConnectTimeoutException;
|
||||
import io.netty.channel.DefaultEventLoopGroup;
|
||||
import io.netty.channel.EventLoop;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import io.netty.handler.timeout.ReadTimeoutException;
|
||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||
import io.netty.handler.timeout.WriteTimeoutException;
|
||||
import io.netty.handler.timeout.WriteTimeoutHandler;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.network.Flag;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.crypt.PacketEncryption;
|
||||
import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
|
||||
|
@ -10,15 +26,6 @@ import org.geysermc.mcprotocollib.network.event.session.SessionEvent;
|
|||
import org.geysermc.mcprotocollib.network.event.session.SessionListener;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.packet.PacketProtocol;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.handler.timeout.ReadTimeoutException;
|
||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||
import io.netty.handler.timeout.WriteTimeoutException;
|
||||
import io.netty.handler.timeout.WriteTimeoutHandler;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.network.Flag;
|
||||
|
||||
import java.net.ConnectException;
|
||||
import java.net.SocketAddress;
|
||||
|
@ -252,7 +259,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler<Packet> imp
|
|||
|
||||
@Override
|
||||
public void send(Packet packet) {
|
||||
if(this.channel == null) {
|
||||
if (this.channel == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -262,7 +269,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler<Packet> imp
|
|||
if (!sendingEvent.isCancelled()) {
|
||||
final Packet toSend = sendingEvent.getPacket();
|
||||
this.channel.writeAndFlush(toSend).addListener((ChannelFutureListener) future -> {
|
||||
if(future.isSuccess()) {
|
||||
if (future.isSuccess()) {
|
||||
callPacketSent(toSend);
|
||||
} else {
|
||||
exceptionCaught(null, future.cause());
|
||||
|
|
|
@ -103,7 +103,8 @@ public class ServerListener extends SessionAdapter {
|
|||
session.disconnect("Outdated client! Please use " + protocol.getCodec().getMinecraftVersion() + ".");
|
||||
}
|
||||
}
|
||||
default -> throw new UnsupportedOperationException("Invalid client intent: " + intentionPacket.getIntent());
|
||||
default ->
|
||||
throw new UnsupportedOperationException("Invalid client intent: " + intentionPacket.getIntent());
|
||||
}
|
||||
}
|
||||
} else if (protocol.getState() == ProtocolState.LOGIN) {
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
package org.geysermc.mcprotocollib.protocol.codec;
|
||||
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufInputStream;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
import org.cloudburstmc.nbt.*;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.cloudburstmc.math.vector.Vector3f;
|
||||
import org.cloudburstmc.math.vector.Vector3i;
|
||||
import org.cloudburstmc.math.vector.Vector4f;
|
||||
import org.cloudburstmc.nbt.NBTInputStream;
|
||||
import org.cloudburstmc.nbt.NBTOutputStream;
|
||||
import org.cloudburstmc.nbt.NbtMap;
|
||||
import org.cloudburstmc.nbt.NbtType;
|
||||
import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Holder;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Identifier;
|
||||
|
@ -27,10 +41,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOp
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.ArmadilloState;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.SnifferState;
|
||||
|
@ -40,6 +50,10 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.player.BlockBreakSta
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.PaintingType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.LightUpdateData;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType;
|
||||
|
@ -68,29 +82,23 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.sound.SoundCategory;
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.statistic.StatisticCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.cloudburstmc.math.vector.Vector3f;
|
||||
import org.cloudburstmc.math.vector.Vector3i;
|
||||
import org.cloudburstmc.math.vector.Vector4f;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.IntFunction;
|
||||
import java.util.function.ObjIntConsumer;
|
||||
import java.util.function.ToIntFunction;
|
||||
|
||||
import static org.cloudburstmc.nbt.NbtType.byClass;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class MinecraftCodecHelper extends BasePacketCodecHelper {
|
||||
private static final int POSITION_X_SIZE = 38;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.codec;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketSerializer;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketDefinition;
|
||||
import org.geysermc.mcprotocollib.network.codec.PacketSerializer;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class MinecraftPacketSerializer<T extends MinecraftPacket> implements PacketSerializer<T, MinecraftCodecHelper> {
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.cloudburstmc.nbt.NbtType;
|
|||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.codec;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.ProtocolState;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.geysermc.mcprotocollib.protocol.data.ProtocolState;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.function.Supplier;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game;
|
||||
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
|
||||
import java.security.PublicKey;
|
||||
import java.util.UUID;
|
||||
|
@ -23,7 +23,7 @@ public class PlayerListEntry {
|
|||
private UUID sessionId;
|
||||
private long expiresAt;
|
||||
private @Nullable PublicKey publicKey;
|
||||
private byte @Nullable[] keySignature;
|
||||
private byte @Nullable [] keySignature;
|
||||
|
||||
public PlayerListEntry(UUID profileId) {
|
||||
this(profileId, null, false, 0, GameMode.SURVIVAL, null, null, 0, null, null);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.advancement;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chat;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class MessageSignature {
|
||||
private final int id;
|
||||
private final byte @Nullable[] messageSignature;
|
||||
private final byte @Nullable [] messageSignature;
|
||||
|
||||
public static MessageSignature read(ByteBuf in, MinecraftCodecHelper helper) {
|
||||
int id = helper.readVarInt(in) - 1;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chunk;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -32,7 +36,7 @@ public class BitStorage {
|
|||
};
|
||||
|
||||
@Getter
|
||||
private final long @NonNull[] data;
|
||||
private final long @NonNull [] data;
|
||||
@Getter
|
||||
private final int bitsPerEntry;
|
||||
@Getter
|
||||
|
@ -48,7 +52,7 @@ public class BitStorage {
|
|||
this(bitsPerEntry, size, null);
|
||||
}
|
||||
|
||||
public BitStorage(int bitsPerEntry, int size, long @Nullable[] data) {
|
||||
public BitStorage(int bitsPerEntry, int size, long @Nullable [] data) {
|
||||
if (bitsPerEntry < 1 || bitsPerEntry > 32) {
|
||||
throw new IllegalArgumentException("bitsPerEntry must be between 1 and 32, inclusive.");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chunk;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
|
||||
@Data
|
||||
@Setter(AccessLevel.NONE)
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chunk;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.*;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.GlobalPalette;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.ListPalette;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.MapPalette;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.Palette;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.PaletteType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.SingletonPalette;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chunk.palette;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.chunk.palette;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ public interface Palette {
|
|||
/**
|
||||
* Creates a copy of this palette.
|
||||
* This performs a deep copy of the palette's internal data.
|
||||
*
|
||||
* @return The palette's copy.
|
||||
*/
|
||||
Palette copy();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.command;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.command.properties.CommandProperties;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.command.properties.CommandProperties;
|
||||
|
||||
import java.util.OptionalInt;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.command;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Identifier;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Identifier;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.command.properties;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Identifier;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Identifier;
|
||||
|
||||
@Data
|
||||
public class ResourceProperties implements CommandProperties {
|
||||
|
|
|
@ -3,12 +3,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.attribute;
|
|||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public interface AttributeType {
|
||||
|
||||
String getIdentifier();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class BooleanMetadataType extends MetadataType<Boolean> {
|
||||
private final BooleanReader primitiveReader;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class ByteMetadataType extends MetadataType<Byte> {
|
||||
private final ByteReader primitiveReader;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ObjectEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ObjectEntityMetadata;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.FloatEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class FloatMetadataType extends MetadataType<Float> {
|
||||
private final FloatReader primitiveReader;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class IntMetadataType extends MetadataType<Integer> {
|
||||
private final IntReader primitiveReader;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.LongEntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class LongMetadataType extends MetadataType<Long> {
|
||||
private final LongReader primitiveReader;
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.cloudburstmc.math.vector.Vector3f;
|
||||
import org.cloudburstmc.math.vector.Vector3i;
|
||||
import org.cloudburstmc.math.vector.Vector4f;
|
||||
import org.cloudburstmc.nbt.NbtMap;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata;
|
||||
|
@ -12,12 +18,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.PaintingType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.cloudburstmc.math.vector.Vector3f;
|
||||
import org.cloudburstmc.math.vector.Vector3i;
|
||||
import org.cloudburstmc.math.vector.Vector4f;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
||||
import java.util.OptionalInt;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.BooleanMetadataType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class BooleanEntityMetadata extends EntityMetadata<Boolean, BooleanMetadataType> {
|
||||
private final boolean value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.ByteMetadataType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class ByteEntityMetadata extends EntityMetadata<Byte, ByteMetadataType> {
|
||||
private final byte value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.FloatMetadataType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class FloatEntityMetadata extends EntityMetadata<Float, FloatMetadataType> {
|
||||
private final float value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.IntMetadataType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class IntEntityMetadata extends EntityMetadata<Integer, IntMetadataType> {
|
||||
private final int value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.LongMetadataType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class LongEntityMetadata extends EntityMetadata<Long, LongMetadataType> {
|
||||
private final long value;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type;
|
||||
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class ObjectEntityMetadata<T> extends EntityMetadata<T, MetadataType<T>> {
|
||||
private final T value;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.player;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue;
|
||||
|
||||
public enum GameMode implements GameEventValue {
|
||||
SURVIVAL,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.entity.player;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.inventory;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -17,7 +17,7 @@ public class AdventureModePredicate {
|
|||
@AllArgsConstructor
|
||||
public static class BlockPredicate {
|
||||
private final @Nullable String location;
|
||||
private final int @Nullable[] holders;
|
||||
private final int @Nullable [] holders;
|
||||
private final @Nullable List<PropertyMatcher> properties;
|
||||
private final @Nullable NbtMap nbt;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Holder;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Holder;
|
||||
|
||||
public record ArmorTrim(Holder<TrimMaterial> material, Holder<TrimPattern> pattern, boolean showInTooltip) {
|
||||
public record TrimMaterial(String assetName, int ingredientId, float itemModelIndex,
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Holder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.Holder;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent;
|
||||
|
||||
public class BooleanComponentType extends DataComponentType<Boolean> {
|
||||
protected final BooleanReader primitiveReader;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public abstract class DataComponent<V, T extends DataComponentType<V>> {
|
|||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof DataComponent<?,?>)) {
|
||||
if (!(o instanceof DataComponent<?, ?>)) {
|
||||
return false;
|
||||
}
|
||||
DataComponent<?, ?> that = (DataComponent<?, ?>) o;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.cloudburstmc.nbt.NbtList;
|
||||
import org.cloudburstmc.nbt.NbtMap;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
@ -9,9 +12,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -162,7 +162,8 @@ public class DataComponentType<T> {
|
|||
}
|
||||
|
||||
private static Writer<Unit> unitWriter() {
|
||||
return (helper, output, value) -> {};
|
||||
return (helper, output, value) -> {
|
||||
};
|
||||
}
|
||||
|
||||
public static DataComponentType<?> read(ByteBuf in, MinecraftCodecHelper helper) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent;
|
||||
|
||||
public class IntComponentType extends DataComponentType<Integer> {
|
||||
protected final IntReader primitiveReader;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.cloudburstmc.nbt.NbtList;
|
||||
import org.cloudburstmc.nbt.NbtType;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
@ -9,11 +14,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOp
|
|||
import org.geysermc.mcprotocollib.protocol.data.game.level.sound.BuiltinSound;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.sound.CustomSound;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Data
|
||||
|
|
|
@ -17,7 +17,7 @@ public class ToolData {
|
|||
@AllArgsConstructor
|
||||
public static class Rule {
|
||||
private final @Nullable String location;
|
||||
private final int @Nullable[] holders;
|
||||
private final int @Nullable [] holders;
|
||||
private final @Nullable Float speed;
|
||||
private final @Nullable Boolean correctForDrops;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.BooleanComponentType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class BooleanDataComponent extends DataComponent<Boolean, BooleanComponentType> {
|
||||
private final Boolean value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component.type;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.IntComponentType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.NonNull;
|
||||
|
||||
|
||||
public class IntDataComponent extends DataComponent<Integer, IntComponentType> {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.item.component.type;
|
||||
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType;
|
||||
import lombok.NonNull;
|
||||
|
||||
public class ObjectDataComponent<T> extends DataComponent<T, DataComponentType<T>> {
|
||||
private final T value;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.block.value;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.block.value;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.block.value;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.event;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.event;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
import lombok.Value;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.event;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.particle;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.level.particle;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.PositionSource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.PositionSource;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.data.RecipeData;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.data.RecipeData;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.recipe.data;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.statistic;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.game.statistic;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.status.handler;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
|
||||
public interface ServerInfoBuilder {
|
||||
ServerStatusInfo buildInfo(Session session);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.geysermc.mcprotocollib.protocol.data.status.handler;
|
||||
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo;
|
||||
|
||||
public interface ServerInfoHandler {
|
||||
void handle(Session session, ServerStatusInfo info);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue