Class Request.Target

  • Enclosing class:
    Request

    @AvailableSince("3.0.0")
    public static final class Request.Target
    extends Object
    A recipient of an effect.

    This corresponds to a Twitch streamer connected to the Crowd Control server.

    Since:
    3.0.0
    • Constructor Detail

      • Target

        @AvailableSince("3.3.0")
        @Deprecated
        @ScheduledForRemoval(inVersion="3.6.0")
        public Target​(@Nullable
                      @Nullable String id,
                      @Nullable
                      @Nullable String name,
                      @Nullable
                      @Nullable String avatar)
        Deprecated.
        Use the builder instead.
        Instantiates a Request.Target with the given streamer information.
        Parameters:
        id - streamer ID
        name - streamer name
        avatar - streamer avatar
        Since:
        3.3.0
    • Method Detail

      • getId

        @AvailableSince("3.0.0")
        @Nullable
        @CheckReturnValue
        public @Nullable String getId()
        The recipient's ID.

        Prior to 3.4.0, this method returned an integer representing a Twitch streamer ID. Now, it may return a string representing the ID of a streamer on Twitch or on a different platform. It may also return null if the ID is unknown.

        Returns:
        streamer ID
        Since:
        3.0.0
      • getName

        @AvailableSince("3.0.0")
        @Nullable
        @CheckReturnValue
        public @Nullable String getName()
        The recipient's display name. May be null if the name is unknown.
        Returns:
        display name
        Since:
        3.0.0
      • getLogin

        @AvailableSince("3.5.2")
        @Nullable
        @CheckReturnValue
        public @Nullable String getLogin()
        The recipient's username. May be null if the username is unknown.
        Returns:
        username
        Since:
        3.5.2
      • getAvatar

        @AvailableSince("3.0.0")
        @Nullable
        @CheckReturnValue
        public @Nullable String getAvatar()
        Gets the URL of the recipient's avatar. May be null if the avatar is unknown.
        Returns:
        avatar URL
        Since:
        3.0.0