Package net.minestom.server.command
Class ConsoleSender
java.lang.Object
net.minestom.server.command.ConsoleSender
- All Implemented Interfaces:
Audience
,Identified
,Pointered
,CommandSender
,Taggable
,TagReadable
,TagWritable
Represents the console when sending a command to the server.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCasts this object to aConsoleSender
.@NotNull Identity
identity()
boolean
Gets if the sender is aConsoleSender
.@NotNull Pointers
pointers()
void
sendMessage
(@NotNull String message) Sends a raw string message.void
sendMessage
(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type) @NotNull TagHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface net.minestom.server.command.CommandSender
asPlayer, isPlayer, sendMessage
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
Methods inherited from interface net.minestom.server.tag.Taggable
getAndSetTag, getAndUpdateTag, getTag, hasTag, removeTag, setTag, updateAndGetTag, updateTag
-
Constructor Details
-
ConsoleSender
public ConsoleSender()
-
-
Method Details
-
sendMessage
Description copied from interface:CommandSender
Sends a raw string message.- Specified by:
sendMessage
in interfaceCommandSender
- Parameters:
message
- the message to send
-
sendMessage
public void sendMessage(@NotNull @NotNull Identity source, @NotNull @NotNull Component message, @NotNull @NotNull MessageType type) - Specified by:
sendMessage
in interfaceAudience
-
isConsole
public boolean isConsole()Description copied from interface:CommandSender
Gets if the sender is aConsoleSender
.Consider using
instanceof
instead.- Specified by:
isConsole
in interfaceCommandSender
- Returns:
- true if 'this' is the console, false otherwise
-
asConsole
Description copied from interface:CommandSender
Casts this object to aConsoleSender
. No checks are performed,ClassCastException
can very much happen.- Specified by:
asConsole
in interfaceCommandSender
- See Also:
-
tagHandler
- Specified by:
tagHandler
in interfaceTaggable
-
identity
- Specified by:
identity
in interfaceIdentified
-
pointers
-