Interface CommandSource
- All Superinterfaces:
Audience, ForwardingAudience, ForwardingAudience.Single, Pointered
The context a command runs in. /execute can change the executor and location,
but never the sender. Messages sent to a source go to its sender.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface ForwardingAudience
ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this source acting asexecutor, like /execute as.Returns a copy of this source running atlocation, like /execute at.default Audienceaudience()executor()Returns the entity the command acts as, ornullif none.location()Returns where the command runs, ornullif no world is loaded.static CommandSourceof(CommandSender sender) Returns a source forsender, with no executor or location.sender()Returns who ran the command.default Serverserver()Returns the server the command runs on.Methods inherited from interface Audience
deleteMessage, openBook, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface ForwardingAudience.Single
audiences, clearResourcePacks, clearTitle, closeDialog, deleteMessage, filterAudience, forEachAudience, get, getOrDefault, getOrDefaultFrom, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, showDialog, stopSound
-
Method Details
-
of
Returns a source forsender, with no executor or location.- Parameters:
sender- who runs the command- Returns:
- a source for
sender, with no executor or location - Since:
- 0.1.0
-
sender
-
executor
-
location
-
as
Returns a copy of this source acting asexecutor, like /execute as.- Returns:
- a copy of this source acting as
executor, like /execute as - Since:
- 0.1.0
-
at
Returns a copy of this source running atlocation, like /execute at.- Returns:
- a copy of this source running at
location, like /execute at - Since:
- 0.1.0
-
server
Returns the server the command runs on.- Returns:
- the server the command runs on
- Since:
- 0.1.0
-
audience
- Specified by:
audiencein interfaceForwardingAudience.Single
-