From 6bfa4b3d6696015b2137e8a2c85f889f412d342e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 6 Jun 2014 13:59:22 +1200 Subject: [PATCH] Set the miscDisguise id and data --- .../libraryaddict/disguise/disguisetypes/MiscDisguise.java | 5 ++++- .../disguise/disguisetypes/PlayerDisguise.java | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java b/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java index 3a4f3632..7f77223e 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java @@ -47,13 +47,16 @@ public class MiscDisguise extends TargetedDisguise { + " instead"); } createDisguise(disguiseType); + this.id = getType().getDefaultId(); + this.data = getType().getEntityId(); switch (disguiseType) { // The only disguises which should use a custom data. case PAINTING: ((PaintingWatcher) getWatcher()).setArt(Art.values()[Math.max(0, firstParam) % Art.values().length]); break; case FALLING_BLOCK: - ((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(Math.max(1, firstParam), 1, (short) Math.max(0, secondParam))); + ((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(Math.max(1, firstParam), 1, (short) Math.max(0, + secondParam))); break; case SPLASH_POTION: ((SplashPotionWatcher) getWatcher()).setPotionId(Math.max(0, firstParam)); diff --git a/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index eaddecb5..c6231160 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -109,9 +109,9 @@ public class PlayerDisguise extends TargetedDisguise { } } }; - WrappedGameProfile obj = DisguiseUtilities.getProfileFromMojang(this.skinToUse, currentLookup); - if (obj != null) { - setSkin(obj); + WrappedGameProfile gameProfile = DisguiseUtilities.getProfileFromMojang(this.skinToUse, currentLookup); + if (gameProfile != null) { + setSkin(gameProfile); } } }