From ba064f649fe192510d4c4e362616ee4fe81ddc7d Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 6 Dec 2013 20:22:05 +0100 Subject: [PATCH] Depreciate everything in PacketTest. --- .../java/com/comphenix/protocol/Packets.java | 16 +++++++++++++--- .../protocol/events/PacketContainerTest.java | 5 +++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java index 239f94fa..b361ec0b 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java @@ -25,9 +25,11 @@ import com.comphenix.protocol.reflect.IntEnum; /** * List of known packet IDs since 1.3.2. - * + *

+ * Deprecated: Use {@link PacketType} instead. * @author Kristian */ +@Deprecated public final class Packets { /** @@ -43,7 +45,7 @@ public final class Packets { /** * List of packets sent only by the server. *

- * This has been superceded by PacketType. + * Deprecated: Use {@link PacketType} instead. * @author Kristian */ @Deprecated @@ -196,7 +198,7 @@ public final class Packets { /** * List of packets sent by the client. *

- * This has been superceded by PacketType. + * Deprecated: Use {@link PacketType} instead. * @author Kristian */ @Deprecated @@ -288,6 +290,8 @@ public final class Packets { /** * A registry that parses between names and packet IDs. + *

+ * Deprecated: Use {@link PacketType} instead. * @return The current client registry. */ @Deprecated @@ -297,6 +301,8 @@ public final class Packets { /** * A registry that parses between names and packet IDs. + *

+ * Deprecated: Use {@link PacketType} instead. * @return The current server registry. */ @Deprecated @@ -306,6 +312,8 @@ public final class Packets { /** * Find a packet by name. Must be capitalized and use underscores. + *

+ * Deprecated: Use {@link PacketType} instead. * @param name - name of packet to find. * @return The packet ID found. */ @@ -321,6 +329,8 @@ public final class Packets { /** * Retrieves the name of a packet. + *

+ * Deprecated: Use {@link PacketType} instead. * @param packetID - packet to retrieve name. * @return The name, or NULL if unable to find such a packet. */ diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java index 6fa0c328..51fa812a 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java @@ -49,6 +49,7 @@ import com.comphenix.protocol.PacketType.Sender; import com.comphenix.protocol.injector.PacketConstructor; import com.comphenix.protocol.reflect.EquivalentConverter; import com.comphenix.protocol.reflect.StructureModifier; +import com.comphenix.protocol.utility.MinecraftMethods; import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.wrappers.BukkitConverters; import com.comphenix.protocol.wrappers.ChunkPosition; @@ -231,6 +232,10 @@ public class PacketContainerTest { @Test public void testGetWorldTypeModifier() { + // Not used in Netty + if (MinecraftReflection.isUsingNetty()) + return; + PacketContainer loginPacket = new PacketContainer(Packets.Server.LOGIN); StructureModifier worldAccess = loginPacket.getWorldTypeModifier();