Interface CommandSender

All Superinterfaces:
net.kyori.adventure.audience.Audience, Permissible, net.kyori.adventure.pointer.Pointered, ServerOperator
All Known Subinterfaces:
AbstractArrow, AbstractHorse, AbstractSkeleton, AbstractVillager, AbstractWindCharge, Ageable, Allay, Ambient, Animals, AreaEffectCloud, Armadillo, ArmorStand, Arrow, Axolotl, Bat, Bee, Blaze, BlockCommandSender, BlockDisplay, Boat, Bogged, Boss, Breedable, Breeze, BreezeWindCharge, Bucketable, Camel, Cat, CaveSpider, ChestBoat, ChestedHorse, Chicken, Cod, CollarColorable, CommandMinecart, ComplexEntityPart, ComplexLivingEntity, ConsoleCommandSender, Cow, Creature, Creeper, Damageable, Display, Dolphin, Donkey, DragonFireball, Drowned, Egg, ElderGuardian, EnderCrystal, EnderDragon, EnderDragonPart, Enderman, Endermite, EnderPearl, EnderSignal, Enemy, Entity, Evoker, EvokerFangs, ExperienceOrb, Explosive, ExplosiveMinecart, FallingBlock, Fireball, Firework, Fish, FishHook, Flying, Fox, Frog, Ghast, Giant, GlowItemFrame, GlowSquid, Goat, Golem, Guardian, Hanging, Hoglin, HopperMinecart, Horse, HumanEntity, Husk, Illager, Illusioner, Interaction, IronGolem, Item, ItemDisplay, ItemFrame, LargeFireball, LeashHitch, LightningStrike, LingeringPotion, LivingEntity, Llama, LlamaSpit, MagmaCube, Marker, MessageCommandSender, Minecart, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, OminousItemSpawner, Painting, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PoweredMinecart, Projectile, ProxiedCommandSender, PufferFish, Rabbit, Raider, RangedEntity, Ravager, RemoteConsoleCommandSender, RideableMinecart, Salmon, SchoolableFish, Shearable, Sheep, Shulker, ShulkerBullet, Silverfish, SizedFireball, Skeleton, SkeletonHorse, Slime, SmallFireball, Sniffer, Snowball, Snowman, SpawnerMinecart, SpectralArrow, Spellcaster, Spider, SplashPotion, Squid, Steerable, StorageMinecart, Stray, Strider, Tadpole, Tameable, TextDisplay, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, TNTPrimed, TraderLlama, Trident, TropicalFish, Turtle, Vehicle, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterMob, WindCharge, Witch, Wither, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager
All Known Implementing Classes:
BufferedCommandSender, TimingsReportListener

public interface CommandSender extends net.kyori.adventure.audience.Audience, Permissible
  • Method Details

    • sendMessage

      @Obsolete void sendMessage(@NotNull @NotNull String message)
      Sends this sender a message
      Parameters:
      message - Message to be displayed
      See Also:
    • sendMessage

      @Obsolete void sendMessage(@NotNull @NotNull String... messages)
      Sends this sender multiple messages
      Parameters:
      messages - An array of messages to be displayed
      See Also:
    • sendMessage

      @Deprecated void sendMessage(@Nullable @Nullable UUID sender, @NotNull @NotNull String message)
      Deprecated.
      sender UUID is ignored
      Sends this sender a message
      Parameters:
      sender - The sender of this message
      message - Message to be displayed
      See Also:
      • Audience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
    • sendMessage

      @Deprecated void sendMessage(@Nullable @Nullable UUID sender, @NotNull @NotNull String... messages)
      Deprecated.
      sender UUID is ignored
      Sends this sender multiple messages
      Parameters:
      sender - The sender of this message
      messages - An array of messages to be displayed
      See Also:
      • Audience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
    • getServer

      @NotNull @NotNull Server getServer()
      Returns the server instance that this command is running on
      Returns:
      Server instance
    • getName

      Gets the name of this command sender
      Returns:
      Name of the sender
    • spigot

    • name

      @NotNull net.kyori.adventure.text.Component name()
      Gets the name of this command sender
      Returns:
      Name of the sender
    • sendMessage

      default void sendMessage(@NotNull net.kyori.adventure.identity.Identity identity, @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.audience.MessageType type)
      Description copied from interface: net.kyori.adventure.audience.Audience
      Sends a player chat message from the entity represented by the given Identity to this Audience with the ChatType corresponding to the provided MessageType.
      Specified by:
      sendMessage in interface net.kyori.adventure.audience.Audience
      Parameters:
      identity - the identity of the source of the message
      message - a message
      type - the type
      See Also:
      • Component
    • sendRichMessage

      default void sendRichMessage(@NotNull @NotNull String message)
      Sends a message with the MiniMessage format to the command sender.

      See MiniMessage docs for more information on the format.

      Parameters:
      message - MiniMessage content
    • sendRichMessage

      default void sendRichMessage(@NotNull @NotNull String message, @NotNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolvers)
      Sends a message with the MiniMessage format to the command sender.

      See MiniMessage docs and MiniMessage Placeholders docs for more information on the format.

      Parameters:
      message - MiniMessage content
      resolvers - resolvers to use
    • sendPlainMessage

      default void sendPlainMessage(@NotNull @NotNull String message)
      Sends a plain message to the command sender.
      Parameters:
      message - plain message
    • sendMessage

      @Deprecated default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component)
      Sends the component to the sender

      If this sender does not support sending full components then the component will be sent as legacy text.

      Parameters:
      component - the component to send
    • sendMessage

      @Deprecated default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components)
      Sends an array of components as a single message to the sender

      If this sender does not support sending full components then the components will be sent as legacy text.

      Parameters:
      components - the components to send