Package org.bukkit.command
Interface CommandSender
- All Superinterfaces:
- Audience,- Permissible,- Pointered,- ServerOperator
- All Known Subinterfaces:
- AbstractArrow,- AbstractHorse,- AbstractSkeleton,- AbstractVillager,- Ageable,- Allay,- Ambient,- Animals,- AreaEffectCloud,- ArmorStand,- Arrow,- Axolotl,- Bat,- Bee,- Blaze,- BlockCommandSender,- BlockDisplay,- Boat,- Boss,- Breedable,- 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,- 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,- Witch,- Wither,- WitherSkeleton,- WitherSkull,- Wolf,- Zoglin,- Zombie,- ZombieHorse,- ZombieVillager
- All Known Implementing Classes:
- BufferedCommandSender,- TimingsReportListener
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptiongetName()Gets the name of this command senderReturns the server instance that this command is running onname()Gets the name of this command sendervoidsendMessage(@NotNull String message) Sends this sender a messagevoidsendMessage(@NotNull String... messages) Sends this sender multiple messagesdefault voidsendMessage(@NotNull Identity identity, @NotNull Component message, @NotNull MessageType type) Sends a player chat message from the entity represented by the givenIdentityto thisAudiencewith theChatTypecorresponding to the providedMessageType.default voidsendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) Deprecated.voidsendMessage(@Nullable UUID sender, @NotNull String message) Deprecated.sender UUID is ignoredvoidsendMessage(@Nullable UUID sender, @NotNull String... messages) Deprecated.sender UUID is ignoreddefault voidsendMessage(net.md_5.bungee.api.chat.BaseComponent component) Deprecated.usesendMessage(Identity, Component, MessageType)insteaddefault voidsendPlainMessage(@NotNull String message) Sends a plain message to the command sender.default voidsendRichMessage(@NotNull String message) Sends a message with the MiniMessage format to the command sender.default voidsendRichMessage(@NotNull String message, @NotNull TagResolver... resolvers) Sends a message with the MiniMessage format to the command sender.spigot()Methods inherited from interface net.kyori.adventure.audience.AudienceclearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface net.kyori.adventure.pointer.Pointeredget, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.permissions.ServerOperatorisOp, setOp
- 
Method Details- 
sendMessageSends this sender a message- Parameters:
- message- Message to be displayed
- See Also:
 
- 
sendMessageSends this sender multiple messages- Parameters:
- messages- An array of messages to be displayed
- See Also:
 
- 
sendMessageDeprecated.sender UUID is ignoredSends this sender a message- Parameters:
- message- Message to be displayed
- sender- The sender of this message
- See Also:
 
- 
sendMessageDeprecated.sender UUID is ignoredSends this sender multiple messages- Parameters:
- messages- An array of messages to be displayed
- sender- The sender of this message
- See Also:
 
- 
getServerReturns the server instance that this command is running on- Returns:
- Server instance
 
- 
getNameGets the name of this command sender- Returns:
- Name of the sender
 
- 
spigot
- 
nameGets the name of this command sender- Returns:
- Name of the sender
 
- 
sendMessagedefault void sendMessage(@NotNull Identity identity, @NotNull Component message, @NotNull MessageType type) Description copied from interface:net.kyori.adventure.audience.AudienceSends a player chat message from the entity represented by the givenIdentityto thisAudiencewith theChatTypecorresponding to the providedMessageType.- Specified by:
- sendMessagein interface- Audience
- Parameters:
- identity- the identity of the source of the message
- message- a message
- type- the type
- See Also:
 
- 
sendRichMessageSends a message with the MiniMessage format to the command sender.See MiniMessage docs for more information on the format. - Parameters:
- message- MiniMessage content
 
- 
sendRichMessageSends 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
 
- 
sendPlainMessageSends a plain message to the command sender.- Parameters:
- message- plain message
 
- 
sendMessageDeprecated.usesendMessage(Identity, Component, MessageType)insteadSends the component to the senderIf 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 @NotNull net.md_5.bungee.api.chat.BaseComponent... components) Deprecated.usesendMessage(Identity, Component, MessageType)insteadSends an array of components as a single message to the senderIf this sender does not support sending full components then the components will be sent as legacy text. - Parameters:
- components- the components to send
 
 
- 
sendMessage(Identity, Component, MessageType)instead