From 24e543b33bb43dd7572e9f221c121a21339c05eb Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Sun, 29 Mar 2015 23:02:59 -0400 Subject: [PATCH] The login start packet is a better source for GameProfiles --- .../com/comphenix/protocol/utility/MinecraftReflection.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java index 6c7bcb01..bf7fc643 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java @@ -448,10 +448,8 @@ public class MinecraftReflection { /** * Determine if a given object is a ChunkCoordinate. * @param obj - the object to test. - * @deprecated ChunkCoordinate(s) does not exist. * @return TRUE if it can, FALSE otherwise. */ - @Deprecated public static boolean isChunkCoordinates(Object obj) { Class chunkCoordinates = getChunkCoordinatesClass(); return obj != null && chunkCoordinates != null && chunkCoordinates.isAssignableFrom(obj.getClass()); @@ -599,8 +597,7 @@ public class MinecraftReflection { try { return GameProfile.class; } catch (Throwable ex) { - // As far as I can tell, the named entity spawn packet is the only packet that uses GameProfiles - FuzzyReflection reflection = FuzzyReflection.fromClass(PacketType.Play.Server.NAMED_ENTITY_SPAWN.getPacketClass(), true); + FuzzyReflection reflection = FuzzyReflection.fromClass(PacketType.Login.Client.START.getPacketClass(), true); FuzzyFieldContract contract = FuzzyFieldContract.newBuilder() .banModifier(Modifier.STATIC) .typeMatches(FuzzyMatchers.matchRegex("(.*)(GameProfile)", 1))