Change setSkin in playerDisguise to return the disguise

This commit is contained in:
libraryaddict 2014-07-11 16:37:34 +12:00
parent d37acf8f84
commit 0791461629

View File

@ -95,7 +95,7 @@ public class PlayerDisguise extends TargetedDisguise {
}
@Deprecated
public void setSkin(String skinToUse) {
public PlayerDisguise setSkin(String skinToUse) {
this.skinToUse = skinToUse;
if (skinToUse == null) {
this.currentLookup = null;
@ -123,6 +123,7 @@ public class PlayerDisguise extends TargetedDisguise {
}
}
}
return this;
}
/**
@ -130,9 +131,10 @@ public class PlayerDisguise extends TargetedDisguise {
*
* @param gameProfile
* GameProfile
* @return
*/
@Deprecated
public void setSkin(WrappedGameProfile gameProfile) {
public PlayerDisguise setSkin(WrappedGameProfile gameProfile) {
if (gameProfile == null) {
this.gameProfile = null;
this.skinToUse = null;
@ -143,7 +145,7 @@ public class PlayerDisguise extends TargetedDisguise {
this.skinToUse = gameProfile.getName();
this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(
gameProfile.getId() != null ? UUID.fromString(gameProfile.getId()) : null, getName(), gameProfile);
return this;
}
}