Interface AccountManager

    • Method Detail

      • getSelfUser

        @Nonnull
        SelfUser getSelfUser()
        The SelfUser that will be modified by this AccountManager.
        This represents the currently logged in account.
        Returns:
        The corresponding SelfUser
      • reset

        @Nonnull
        @CheckReturnValue
        AccountManager reset​(long fields)
        Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
        Example: manager.reset(AccountManager.NAME | AccountManager.AVATAR);

        Flag Constants:

        Specified by:
        reset in interface Manager<AccountManager>
        Parameters:
        fields - Integer value containing the flags to reset.
        Returns:
        AccountManager for chaining convenience
      • reset

        @Nonnull
        @CheckReturnValue
        AccountManager reset​(long... fields)
        Resets the fields specified by the provided bit-flag patterns. You can specify a combination by using a bitwise OR concat of the flag constants.
        Example: manager.reset(AccountManager.NAME, AccountManager.AVATAR);

        Flag Constants:

        Specified by:
        reset in interface Manager<AccountManager>
        Parameters:
        fields - Integer values containing the flags to reset.
        Returns:
        AccountManager for chaining convenience
      • setName

        @Nonnull
        @CheckReturnValue
        AccountManager setName​(@Nonnull
                               java.lang.String name)
        Sets the username for the currently logged in account
        Parameters:
        name - The new username
        Returns:
        AccountManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided name is:
        • Equal to null
        • Less than 2 or more than 32 characters in length
      • setAvatar

        @Nonnull
        @CheckReturnValue
        AccountManager setAvatar​(@Nullable
                                 Icon avatar)
        Sets the avatar for the currently logged in account
        Parameters:
        avatar - An Icon instance representing the new Avatar for the current account, null to reset the avatar to the default avatar.
        Returns:
        AccountManager for chaining convenience