Interface ToastRender


public interface ToastRender
Renders toast notifications (advancement-style popups) to players.

Usage example:

ToastRender toastRender = flectonePulse.get(ToastRender.class);

Toast toast = new Toast(
    Toast.Style.TASK,
    "minecraft:diamond"
);

toastRender.render(player, Component.text("Achievement Unlocked!"), toast);
Since:
1.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    render(FPlayer fPlayer, net.kyori.adventure.text.Component title, net.kyori.adventure.text.Component description, Toast toast)
    Renders a toast notification to a player.
  • Method Details

    • render

      void render(FPlayer fPlayer, net.kyori.adventure.text.Component title, net.kyori.adventure.text.Component description, Toast toast)
      Renders a toast notification to a player.
      Parameters:
      fPlayer - the player to receive the toast
      title - the title component to display
      description - the description component to display
      toast - the toast configuration including style and icon