Removed method, make sure that playerNames are case insensitive when looking them up

This commit is contained in:
libraryaddict 2014-06-15 19:46:37 +12:00
parent 7f5a6d9dc4
commit 13cf2f5e85
2 changed files with 3 additions and 7 deletions

View File

@ -362,7 +362,8 @@ public class DisguiseUtilities {
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.get(playerName) != null) {
return gameProfiles.get(playerName);
@ -372,7 +373,7 @@ public class DisguiseUtilities {
Player player = Bukkit.getPlayerExact(playerName);
if (player != null) {
WrappedGameProfile gameProfile = ReflectionManager.getGameProfile(player);
if (ReflectionManager.hasSkinBlob(gameProfile)) {
if (!gameProfile.getProperties().isEmpty()) {
gameProfiles.put(playerName, gameProfile);
return gameProfile;
}

View File

@ -14,7 +14,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.collect.ImmutableMap;
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import org.bukkit.Art;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@ -530,10 +529,6 @@ public class ReflectionManager {
return null;
}
public static boolean hasSkinBlob(WrappedGameProfile gameProfile) {
return !gameProfile.getProperties().isEmpty();
}
private static String methodSignaturePart(Class<?> param) {
if (param.isArray()) {
return "[" + methodSignaturePart(param.getComponentType());