Package org.bukkit.command
Interface CommandSender
- All Superinterfaces:
Audience
,Permissible
,ServerOperator
- All Known Subinterfaces:
AbstractArrow
,AbstractHorse
,AbstractVillager
,Ageable
,Ambient
,Animals
,AreaEffectCloud
,ArmorStand
,Arrow
,Bat
,Bee
,Blaze
,BlockCommandSender
,Boat
,Boss
,Breedable
,Cat
,CaveSpider
,ChestedHorse
,Chicken
,Cod
,CommandMinecart
,ComplexEntityPart
,ComplexLivingEntity
,ConsoleCommandSender
,Cow
,Creature
,Creeper
,Damageable
,Dolphin
,Donkey
,DragonFireball
,Drowned
,Egg
,ElderGuardian
,EnderCrystal
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EnderSignal
,Entity
,Evoker
,EvokerFangs
,ExperienceOrb
,Explosive
,ExplosiveMinecart
,FallingBlock
,Fireball
,Firework
,Fish
,FishHook
,Flying
,Fox
,Ghast
,Giant
,Golem
,Guardian
,Hanging
,Hoglin
,HopperMinecart
,Horse
,HumanEntity
,Husk
,Illager
,Illusioner
,IronGolem
,Item
,ItemFrame
,LargeFireball
,LeashHitch
,LightningStrike
,LingeringPotion
,LivingEntity
,Llama
,LlamaSpit
,MagmaCube
,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
,Sheep
,Shulker
,ShulkerBullet
,Silverfish
,SizedFireball
,Skeleton
,SkeletonHorse
,Slime
,SmallFireball
,Snowball
,Snowman
,SpawnerMinecart
,SpectralArrow
,Spellcaster
,Spider
,SplashPotion
,Squid
,Steerable
,StorageMinecart
,Stray
,Strider
,Tameable
,ThrowableProjectile
,ThrownExpBottle
,ThrownPotion
,TippedArrow
,TNTPrimed
,TraderLlama
,Trident
,TropicalFish
,Turtle
,Vehicle
,Vex
,Villager
,Vindicator
,WanderingTrader
,WaterMob
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
- All Known Implementing Classes:
BufferedCommandSender
,TimingsReportListener
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the name of this command senderReturns the server instance that this command is running onvoid
sendMessage(@NotNull String message)
Sends this sender a messagevoid
sendMessage(@NotNull String[] messages)
Sends this sender multiple messagesdefault void
sendMessage(@NotNull BaseComponent... components)
Deprecated.void
sendMessage(@Nullable UUID sender, @NotNull String message)
Sends this sender a messagevoid
sendMessage(@Nullable UUID sender, @NotNull String[] messages)
Sends this sender multiple messagesdefault void
sendMessage(Identity identity, Component message, MessageType type)
default void
sendMessage(BaseComponent component)
Deprecated.usesendMessage(Identity, Component, MessageType)
insteadspigot()
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSound
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
sendMessage
Sends this sender a message- Parameters:
message
- Message to be displayed- See Also:
Audience.sendMessage(net.kyori.adventure.text.Component)
-
sendMessage
Sends this sender multiple messages- Parameters:
messages
- An array of messages to be displayed- See Also:
Audience.sendMessage(net.kyori.adventure.text.Component)
-
sendMessage
Sends this sender a message- Parameters:
message
- Message to be displayedsender
- The sender of this message- See Also:
Audience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
-
sendMessage
Sends this sender multiple messages- Parameters:
messages
- An array of messages to be displayedsender
- The sender of this message- See Also:
Audience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
-
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
-
sendMessage
default void sendMessage(@NotNull Identity identity, @NotNull Component message, @NotNull MessageType type)- Specified by:
sendMessage
in interfaceAudience
-
sendMessage
Deprecated.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.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