Interface Ban.Builder

    • Method Detail

      • address

        Ban.Builder address​(java.net.InetAddress address)
        Sets the IP address to be banned.

        This can only be done if the BanType has been set to BanTypes.IP.

        Parameters:
        address - The IP address
        Returns:
        This builder
      • type

        Ban.Builder type​(BanType type)
        Sets the type of the ban.
        Parameters:
        type - The type to be set
        Returns:
        This builder
      • type

        default Ban.Builder type​(java.util.function.Supplier<? extends BanType> type)
        Sets the type of the ban.
        Parameters:
        type - The type to be set
        Returns:
        This builder
      • reason

        Ban.Builder reason​(@Nullable Component reason)
        Sets the reason for the ban.

        If the specified reason is null, or not provided, then the reason will be be available on the created ban.

        Parameters:
        reason - The reason
        Returns:
        This builder
      • startDate

        Ban.Builder startDate​(java.time.Instant instant)
        Sets the date that the ban starts.
        Parameters:
        instant - The start date
        Returns:
        This builder
      • expirationDate

        Ban.Builder expirationDate​(@Nullable java.time.Instant instant)
        Sets the expiration date of the ban, or removes it.
        Parameters:
        instant - The expiration date, or null in order to remove it
        Returns:
        This builder
      • source

        Ban.Builder source​(@Nullable Component source)
        Sets the source of the ban as a Component, or removes it if null is passed in.
        Parameters:
        source - The source of the ban, or null
        Returns:
        This builder