Class BukkitCommandSender

java.lang.Object
cloud.commandframework.bukkit.BukkitCommandSender

@Deprecated public abstract class BukkitCommandSender extends Object
Deprecated.
No longer used since pre 1.0.0
Command sender that proxies CommandSender
  • Constructor Details

    • BukkitCommandSender

      protected BukkitCommandSender(@NonNull org.bukkit.command.CommandSender internalSender)
      Deprecated.
      Create a new command sender from a Bukkit CommandSender
      Parameters:
      internalSender - Bukkit command sender
  • Method Details

    • player

      public static @NonNull BukkitCommandSender player(@NonNull org.bukkit.entity.Player player)
      Deprecated.
      Construct a new BukkitCommandSender for a Player
      Parameters:
      player - Player instance
      Returns:
      Constructed command sender
    • console

      public static @NonNull BukkitCommandSender console()
      Deprecated.
      Construct a new BukkitCommandSender for the Bukkit console
      Returns:
      Constructed command sender
    • of

      public static @NonNull BukkitCommandSender of(@NonNull org.bukkit.command.CommandSender sender)
      Deprecated.
      Construct a new BukkitCommandSender from a Bukkit CommandSender
      Parameters:
      sender - Bukkit command sender
      Returns:
      Constructed command sender
    • equals

      public final boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • getInternalSender

      public @NonNull org.bukkit.command.CommandSender getInternalSender()
      Deprecated.
      Get the proxied CommandSender
      Returns:
      Proxied command sneder
    • isPlayer

      public abstract boolean isPlayer()
      Deprecated.
      Check if this sender represents a player
      Returns:
      true if this sender represents a player, false if not
    • asPlayer

      public abstract @NonNull org.bukkit.entity.Player asPlayer()
      Deprecated.
      Get this sender as a player. This can only safely be done if isPlayer()} returns true
      Returns:
      Player object
    • sendMessage

      public void sendMessage(@NonNull String message)
      Deprecated.
      Send a message to the command sender
      Parameters:
      message - Message to send