Archiviert
13
0

Depreciate everything in PacketTest.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-12-06 20:22:05 +01:00
Ursprung 2a0e782725
Commit ba064f649f
2 geänderte Dateien mit 18 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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.
*/

Datei anzeigen

@ -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();