Change setSkin in playerDisguise to return the disguise
This commit is contained in:
		| @@ -95,7 +95,7 @@ public class PlayerDisguise extends TargetedDisguise { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Deprecated |     @Deprecated | ||||||
|     public void setSkin(String skinToUse) { |     public PlayerDisguise setSkin(String skinToUse) { | ||||||
|         this.skinToUse = skinToUse; |         this.skinToUse = skinToUse; | ||||||
|         if (skinToUse == null) { |         if (skinToUse == null) { | ||||||
|             this.currentLookup = 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 |      * @param gameProfile | ||||||
|      *            GameProfile |      *            GameProfile | ||||||
|  |      * @return  | ||||||
|      */ |      */ | ||||||
|     @Deprecated |     @Deprecated | ||||||
|     public void setSkin(WrappedGameProfile gameProfile) { |     public PlayerDisguise setSkin(WrappedGameProfile gameProfile) { | ||||||
|         if (gameProfile == null) { |         if (gameProfile == null) { | ||||||
|             this.gameProfile = null; |             this.gameProfile = null; | ||||||
|             this.skinToUse = null; |             this.skinToUse = null; | ||||||
| @@ -143,7 +145,7 @@ public class PlayerDisguise extends TargetedDisguise { | |||||||
|         this.skinToUse = gameProfile.getName(); |         this.skinToUse = gameProfile.getName(); | ||||||
|         this.gameProfile = ReflectionManager.getGameProfileWithThisSkin( |         this.gameProfile = ReflectionManager.getGameProfileWithThisSkin( | ||||||
|                 gameProfile.getId() != null ? UUID.fromString(gameProfile.getId()) : null, getName(), gameProfile); |                 gameProfile.getId() != null ? UUID.fromString(gameProfile.getId()) : null, getName(), gameProfile); | ||||||
|  |         return this; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user