🔗Webhook Builder

Use webhooks in your projects with ease

Overview

The WebhookBuilder class facilitates the sending of messages to Discord webhooks in a Minecraft Bukkit server environment. It provides a simple interface for constructing and sending webhook messages to specified URLs.

Constructor

WebhookBuilder

private WebhookBuilder(String webhookUrl)

Initializes a new instance of the WebhookBuilder class with the specified webhook URL.

Parameters

  • webhookUrl: The URL of the Discord webhook.

Static Factory Method

create

public static WebhookBuilder create(String webhookUrl)

Creates a new WebhookBuilder instance with the specified webhook URL.

Parameters

  • webhookUrl: The URL of the Discord webhook.

Methods

addMessage

public WebhookBuilder addMessage(String message)

Adds a message to be sent via the webhook.

Parameters

  • message: The message to be sent.

build

public void build()

Builds and sends the constructed message to the Discord webhook.

Notes

  • The WebhookBuilder class provides a convenient way to send messages to Discord webhooks.

  • Developers can use the addMessage method to add messages to the webhook.

  • Once configured, the message can be built and sent to the webhook using the build method.

  • This allows for seamless integration of Minecraft server events or notifications with Discord channels.

Last updated