Class SpigotMessageSender

java.lang.Object
fr.prodrivers.bukkit.commons.chat.SpigotMessageSender
All Implemented Interfaces:
MessageSender

public class SpigotMessageSender extends Object implements MessageSender
Default implementation of message sender helper that uses Bukkit/Spigot functions.

This implementation is intended for single servers.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    send(@NonNull UUID receiverPlayerUniqueId, @NonNull String message, @NonNull String prefix)
    Generic message receiver, that potentially supports non-local players, using a defined prefix
    void
    send(@NonNull UUID receiverPlayerUniqueId, @NonNull net.md_5.bungee.api.chat.BaseComponent[] components, @NonNull String prefix)
    Generic message receiver, that potentially supports non-local players, using a defined prefix
    void
    send(@NonNull org.bukkit.command.CommandSender sender, @NonNull String message, @NonNull String prefix)
    Generic message sender
    void
    send(@NonNull org.bukkit.command.CommandSender sender, @NonNull net.md_5.bungee.api.chat.BaseComponent[] components, @NonNull String prefix)
    Generic message receiver, using a defined prefix

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpigotMessageSender

      public SpigotMessageSender()
  • Method Details

    • send

      public void send(@NonNull org.bukkit.command.CommandSender sender, @NonNull String message, @NonNull String prefix)
      Description copied from interface: MessageSender
      Generic message sender
      Specified by:
      send in interface MessageSender
      Parameters:
      sender - Receiving entity
      message - Message to send
      prefix - Prefix to use
    • send

      public void send(@NonNull org.bukkit.command.CommandSender sender, @NonNull net.md_5.bungee.api.chat.BaseComponent[] components, @NonNull String prefix)
      Description copied from interface: MessageSender
      Generic message receiver, using a defined prefix
      Specified by:
      send in interface MessageSender
      Parameters:
      sender - Receiving entity
      components - Message to send
      prefix - Prefix to use
    • send

      public void send(@NonNull UUID receiverPlayerUniqueId, @NonNull String message, @NonNull String prefix)
      Description copied from interface: MessageSender
      Generic message receiver, that potentially supports non-local players, using a defined prefix
      Specified by:
      send in interface MessageSender
      Parameters:
      receiverPlayerUniqueId - Receiving player
      message - Message to send
      prefix - Prefix to use
    • send

      public void send(@NonNull UUID receiverPlayerUniqueId, @NonNull net.md_5.bungee.api.chat.BaseComponent[] components, @NonNull String prefix)
      Description copied from interface: MessageSender
      Generic message receiver, that potentially supports non-local players, using a defined prefix
      Specified by:
      send in interface MessageSender
      Parameters:
      receiverPlayerUniqueId - Receiving player
      components - Message to send
      prefix - Prefix to use