Interface MainClass


public interface MainClass
Abstraction for sending messages to players in BuildMC.

This interface exists to provide a consistent way to send messages to players using Components, regardless of whether the underlying plugin implementation is Paper or Spigot.

Implementations of this interface handle the differences between server platforms internally, so external code can simply call these methods without worrying about platform-specific APIs.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sendPlayerActionBar(org.bukkit.entity.Player player, net.kyori.adventure.text.Component message)
    Sends an action bar message to a player.
    void
    sendPlayerMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.Component message)
    Sends a chat message to a player.
  • Method Details

    • sendPlayerMessage

      void sendPlayerMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.Component message)
      Sends a chat message to a player.
      Parameters:
      player - the player to send the message to
      message - the message to send, as a Component
    • sendPlayerActionBar

      void sendPlayerActionBar(org.bukkit.entity.Player player, net.kyori.adventure.text.Component message)
      Sends an action bar message to a player.
      Parameters:
      player - the player to send the message to
      message - the message to send, as a Component