Some testing code I'd like to keep.
This commit is contained in:
@@ -31,12 +31,6 @@
|
|||||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot</artifactId>
|
|
||||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mojang</groupId>
|
<groupId>com.mojang</groupId>
|
||||||
<artifactId>authlib</artifactId>
|
<artifactId>authlib</artifactId>
|
||||||
|
|||||||
@@ -291,6 +291,11 @@ public abstract class TinyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keeping this here for testing purposes:
|
||||||
|
// public Object onPacketOutAsync(Player receiver, Channel channel, Object packet) {
|
||||||
|
// return packet;
|
||||||
|
// }
|
||||||
|
|
||||||
private final class PacketInterceptor extends ChannelDuplexHandler {
|
private final class PacketInterceptor extends ChannelDuplexHandler {
|
||||||
// Updated by the login event
|
// Updated by the login event
|
||||||
public volatile Player player;
|
public volatile Player player;
|
||||||
@@ -312,6 +317,20 @@ public abstract class TinyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keeping this here for testing purposes:
|
||||||
|
// @Override
|
||||||
|
// public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
|
||||||
|
// try {
|
||||||
|
// msg = onPacketOutAsync(player, ctx.channel(), msg);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// instance.getLogger().severe("Error in onPacketOutAsync().", e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (msg != null) {
|
||||||
|
// super.write(ctx, msg, promise);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
private void handleLoginStart(Channel channel, Object packet) {
|
private void handleLoginStart(Channel channel, Object packet) {
|
||||||
if (PACKET_LOGIN_IN_START.isInstance(packet)) {
|
if (PACKET_LOGIN_IN_START.isInstance(packet)) {
|
||||||
GameProfile profile = getGameProfile.get(packet);
|
GameProfile profile = getGameProfile.get(packet);
|
||||||
|
|||||||
Reference in New Issue
Block a user