From a2ebb92d567eab67cd6aad96b6bb85c5e4eefacf Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 20:53:58 +1100 Subject: [PATCH] Scumbags Forge and Spout. --- .../main/java/net/md_5/bungee/packet/Packet1Login.java | 6 ++++++ .../net/md_5/bungee/packet/PacketFAPluginMessage.java | 6 ++++++ .../main/java/net/md_5/bungee/packet/PacketHandler.java | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/packet/Packet1Login.java b/proxy/src/main/java/net/md_5/bungee/packet/Packet1Login.java index 42d82976..7cb0eb64 100644 --- a/proxy/src/main/java/net/md_5/bungee/packet/Packet1Login.java +++ b/proxy/src/main/java/net/md_5/bungee/packet/Packet1Login.java @@ -39,4 +39,10 @@ public class Packet1Login extends DefinedPacket this.unused = readByte(); this.maxPlayers = readByte(); } + + @Override + public void handle(PacketHandler handler) throws Exception + { + handler.handle(this); + } } diff --git a/proxy/src/main/java/net/md_5/bungee/packet/PacketFAPluginMessage.java b/proxy/src/main/java/net/md_5/bungee/packet/PacketFAPluginMessage.java index de48f4b8..1ca2459f 100644 --- a/proxy/src/main/java/net/md_5/bungee/packet/PacketFAPluginMessage.java +++ b/proxy/src/main/java/net/md_5/bungee/packet/PacketFAPluginMessage.java @@ -26,4 +26,10 @@ public class PacketFAPluginMessage extends DefinedPacket this.tag = readUTF(); this.data = readArray(); } + + @Override + public void handle(PacketHandler handler) throws Exception + { + handler.handle(this); + } } diff --git a/proxy/src/main/java/net/md_5/bungee/packet/PacketHandler.java b/proxy/src/main/java/net/md_5/bungee/packet/PacketHandler.java index dd6466f4..c1be84a6 100644 --- a/proxy/src/main/java/net/md_5/bungee/packet/PacketHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/packet/PacketHandler.java @@ -8,6 +8,10 @@ public abstract class PacketHandler throw new UnsupportedOperationException("No handler defined for packet " + packet.getClass()); } + public void handle(Packet1Login login) throws Exception + { + } + public void handle(Packet2Handshake handshake) throws Exception { } @@ -16,6 +20,10 @@ public abstract class PacketHandler { } + public void handle(PacketFAPluginMessage pluginMessage) throws Exception + { + } + public void handle(PacketFCEncryptionResponse encryptResponse) throws Exception { }