Depreciate everything in PacketTest.

This commit is contained in:
Kristian S. Stangeland 2013-12-06 20:22:05 +01:00
parent 2a0e782725
commit ba064f649f
2 changed files with 18 additions and 3 deletions

View File

@ -25,9 +25,11 @@ import com.comphenix.protocol.reflect.IntEnum;
/**
* List of known packet IDs since 1.3.2.
*
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
* 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.
* <p>
* Deprecated: Use {@link PacketType} instead.
* @param packetID - packet to retrieve name.
* @return The name, or NULL if unable to find such a packet.
*/

View File

@ -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<WorldType> worldAccess = loginPacket.getWorldTypeModifier();