diff --git a/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index 75e8cd19..c41a8911 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -151,7 +151,7 @@ public class PlayerDisguise extends TargetedDisguise { if (skinToUse.length() > 16) { this.skinToUse = skinToUse.substring(0, 16); } - if (LibVersion.is1_7()) { + if (LibVersion.is1_7_6()) { currentLookup = new LibsProfileLookup() { @Override diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index e6e7115a..b0f3edc8 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -20,6 +20,7 @@ import me.libraryaddict.disguise.disguisetypes.TargetedDisguise; import me.libraryaddict.disguise.disguisetypes.watchers.AgeableWatcher; import me.libraryaddict.disguise.disguisetypes.watchers.ZombieWatcher; import me.libraryaddict.disguise.disguisetypes.TargetedDisguise.TargetType; +import me.libraryaddict.disguise.utilities.ReflectionManager.LibVersion; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -344,7 +345,7 @@ public class DisguiseUtilities { getAddedByPlugins().remove(disguise.getName().toLowerCase()); } if (DisguiseAPI.isDisguiseInUse(disguise) - && (!gameProfile.getName().equals(disguise.getName()) || !gameProfile.getProperties().isEmpty())) { + && (!gameProfile.getName().equals(disguise.getName()) || (LibVersion.is1_7_6() && !gameProfile.getProperties().isEmpty()))) { // TODO Resend for UUID? Might need to in the future. DisguiseUtilities.refreshTrackers(disguise); } @@ -371,7 +372,7 @@ public class DisguiseUtilities { Player player = Bukkit.getPlayerExact(playerName); if (player != null) { WrappedGameProfile gameProfile = ReflectionManager.getGameProfile(player); - if (!gameProfile.getProperties().isEmpty()) { + if (!LibVersion.is1_7_6() || !gameProfile.getProperties().isEmpty()) { gameProfiles.put(playerName, gameProfile); return gameProfile; } diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java index 0318b3a7..5360d602 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java @@ -364,7 +364,9 @@ public class ReflectionManager { public static WrappedGameProfile getGameProfileWithThisSkin(UUID uuid, String playerName, WrappedGameProfile profileWithSkin) { try { WrappedGameProfile gameProfile = new WrappedGameProfile(uuid != null ? uuid : UUID.randomUUID(), playerName); - gameProfile.getProperties().putAll(profileWithSkin.getProperties()); + if (LibVersion.is1_7_6()) { + gameProfile.getProperties().putAll(profileWithSkin.getProperties()); + } return gameProfile; } catch (Exception ex) { ex.printStackTrace();