Interface Sender

  • All Superinterfaces:
    com.github.siroshun09.adventureextender.MessageReceivable
    All Known Subinterfaces:
    ConsoleSender
    All Known Implementing Classes:
    BukkitSender, BungeeSender, PaperSender

    public interface Sender
    extends com.github.siroshun09.adventureextender.MessageReceivable
    Interface that wraps a CommandSender that is different on different platforms.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      @NotNull String getName()
      Gets the name of the command sender.
      @NotNull Object getOriginalSender()
      Gets the command sender that the instance is wrapped in.
      @NotNull UUID getUUID()
      Gets the UUID of the command sender.
      boolean hasPermission​(@NotNull String perm)
      Checks if the Sender has the requested permission.
      default boolean isConsole()
      Checks if the sender is console.
      boolean isOnline()
      Checks if the sender is online.
      • Methods inherited from interface com.github.siroshun09.adventureextender.MessageReceivable

        getAudience, sendColorizedMessage, sendColorizedMessage, sendMessage, sendMessage
    • Method Detail

      • hasPermission

        boolean hasPermission​(@NotNull
                              @NotNull String perm)
        Checks if the Sender has the requested permission.
        Parameters:
        perm - a permission.
        Returns:
        true if the sender have permission, false otherwise
      • isOnline

        boolean isOnline()
        Checks if the sender is online.
        Returns:
        true if the sender is online, false otherwise.
      • isConsole

        default boolean isConsole()
        Checks if the sender is console.
        Returns:
        true if the sender is console, false otherwise.
      • getOriginalSender

        @NotNull
        @NotNull Object getOriginalSender()
        Gets the command sender that the instance is wrapped in.
        Returns:
        the original command sender