Interface CapeService
public interface CapeService
Shows or hides the account's capes. The account's owned capes come from the profile read
(
ProfileService.fetch() → PlayerProfile.capes()), so there is no separate list call.
Not designed for host implementation; methods may be added in minor releases.
- Since:
- 0.11.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidhide()Hides whatever cape is shown.default PlayerProfileHides whatever cape is shown and returns the profile as it stands afterwards, the waysetActive(String)does.owned()Returns the capes the account owns, as a convenience over reading them off the profile.Shows the cape with the given id.
-
Method Details
-
owned
Returns the capes the account owns, as a convenience over reading them off the profile.- Returns:
- the owned capes
- Throws:
AltsException- if the token was refused or the service failed- Since:
- 0.11.0
-
setActive
Shows the cape with the given id.- Parameters:
capeId- the cape id (fromCape.id())- Returns:
- the updated profile
- Throws:
AltsException- if the token was refused or the cape is not owned- Since:
- 0.11.0
-
hide
void hide()Hides whatever cape is shown.- Throws:
AltsException- if the token was refused or the service failed- Since:
- 0.11.0
-
hideActive
Hides whatever cape is shown and returns the profile as it stands afterwards, the waysetActive(String)does.- Returns:
- the updated profile, or
nullwhen the service confirmed the change without sending one back - Throws:
AltsException- if the token was refused or the service failed- Since:
- 0.12.0
-