Removed method, make sure that playerNames are case insensitive when looking them up
This commit is contained in:
		| @@ -362,7 +362,8 @@ public class DisguiseUtilities { | |||||||
|         return getProfileFromMojang(playerName, (Object) runnableIfCantReturn); |         return getProfileFromMojang(playerName, (Object) runnableIfCantReturn); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static WrappedGameProfile getProfileFromMojang(final String playerName, final Object runnable) { |     private static WrappedGameProfile getProfileFromMojang(String name, final Object runnable) { | ||||||
|  |         final String playerName = name.toLowerCase(); | ||||||
|         if (gameProfiles.containsKey(playerName)) { |         if (gameProfiles.containsKey(playerName)) { | ||||||
|             if (gameProfiles.get(playerName) != null) { |             if (gameProfiles.get(playerName) != null) { | ||||||
|                 return gameProfiles.get(playerName); |                 return gameProfiles.get(playerName); | ||||||
| @@ -372,7 +373,7 @@ public class DisguiseUtilities { | |||||||
|             Player player = Bukkit.getPlayerExact(playerName); |             Player player = Bukkit.getPlayerExact(playerName); | ||||||
|             if (player != null) { |             if (player != null) { | ||||||
|                 WrappedGameProfile gameProfile = ReflectionManager.getGameProfile(player); |                 WrappedGameProfile gameProfile = ReflectionManager.getGameProfile(player); | ||||||
|                 if (ReflectionManager.hasSkinBlob(gameProfile)) { |                 if (!gameProfile.getProperties().isEmpty()) { | ||||||
|                     gameProfiles.put(playerName, gameProfile); |                     gameProfiles.put(playerName, gameProfile); | ||||||
|                     return gameProfile; |                     return gameProfile; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -14,7 +14,6 @@ import java.util.regex.Matcher; | |||||||
| import java.util.regex.Pattern; | import java.util.regex.Pattern; | ||||||
|  |  | ||||||
| import com.google.common.collect.ImmutableMap; | import com.google.common.collect.ImmutableMap; | ||||||
| import me.libraryaddict.disguise.disguisetypes.DisguiseType; |  | ||||||
| import org.bukkit.Art; | import org.bukkit.Art; | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
| import org.bukkit.Location; | import org.bukkit.Location; | ||||||
| @@ -530,10 +529,6 @@ public class ReflectionManager { | |||||||
|         return null; |         return null; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public static boolean hasSkinBlob(WrappedGameProfile gameProfile) { |  | ||||||
|         return !gameProfile.getProperties().isEmpty(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static String methodSignaturePart(Class<?> param) { |     private static String methodSignaturePart(Class<?> param) { | ||||||
|         if (param.isArray()) { |         if (param.isArray()) { | ||||||
|             return "[" + methodSignaturePart(param.getComponentType()); |             return "[" + methodSignaturePart(param.getComponentType()); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user