Package fr.maxlego08.menu.api.utils
Interface MessageSender
- All Known Subinterfaces:
MetaUpdater
public interface MessageSender
Sends messages to a
CommandSender.-
Method Summary
Modifier and TypeMethodDescriptionvoidsendMessage(org.bukkit.command.CommandSender sender, String message) Sends a message to the specifiedCommandSender.voidsendTitle(org.bukkit.entity.Player player, String title, String subtitle, long start, long duration, long end) Sends a title and subtitle to the player with specified timings for the display.
-
Method Details
-
sendMessage
Sends a message to the specifiedCommandSender.- Parameters:
sender- The CommandSender to whom the message will be sent.message- The message to be sent.
-
sendTitle
void sendTitle(org.bukkit.entity.Player player, String title, String subtitle, long start, long duration, long end) Sends a title and subtitle to the player with specified timings for the display. This method provides a way to display prominent messages directly in the player's view, offering an engaging way to present information, alerts, or narrative elements within the game. The timing parameters control the duration of the fade-in, the time the title stays on the screen, and the fade-out duration, allowing for a customizable viewing experience.- Parameters:
player- The playertitle- The main title text to be displayed at the top of the screen. Can be formatted with color codes.subtitle- The secondary text to be displayed beneath the main title. Also supports formatting with color codes.start- The duration in ticks (1 tick = 1/20th of a second) before the title and subtitle start fading in.duration- The time in ticks that the title and subtitle will stay fully visible on the screen before starting to fade out.end- The duration in ticks for the title and subtitle to fade out.
-