Package com.ultikits.ultitools.manager
Class CommandExecutionManager.CommandOutputCapture
java.lang.Object
com.ultikits.ultitools.manager.CommandExecutionManager.CommandOutputCapture
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.pointer.Pointered,org.bukkit.command.CommandSender,org.bukkit.command.ConsoleCommandSender,org.bukkit.conversations.Conversable,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator
- Enclosing class:
CommandExecutionManager
private static class CommandExecutionManager.CommandOutputCapture
extends Object
implements org.bukkit.command.ConsoleCommandSender
命令输出捕获器
Implements ConsoleCommandSender (not just CommandSender) because Paper 1.21+
requires the sender to be a recognized type when dispatching commands through
Brigadier. Paper's VanillaCommandWrapper.getListener() checks instanceof for
ConsoleCommandSender, Player, etc. A plain CommandSender implementation would
cause dispatchCommand() to return false.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.command.CommandSender
org.bukkit.command.CommandSender.Spigot -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.bukkit.command.CommandSenderprivate final StringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabandonConversation(org.bukkit.conversations.Conversation conversation) voidabandonConversation(org.bukkit.conversations.Conversation conversation, org.bukkit.conversations.ConversationAbandonedEvent details) voidacceptConversationInput(String input) org.bukkit.permissions.PermissionAttachmentaddAttachment(org.bukkit.plugin.Plugin plugin) org.bukkit.permissions.PermissionAttachmentaddAttachment(org.bukkit.plugin.Plugin plugin, int ticks) org.bukkit.permissions.PermissionAttachmentaddAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value) org.bukkit.permissions.PermissionAttachmentaddAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value, int ticks) booleanbeginConversation(org.bukkit.conversations.Conversation conversation) Set<org.bukkit.permissions.PermissionAttachmentInfo> getName()org.bukkit.ServerbooleanhasPermission(String name) booleanhasPermission(org.bukkit.permissions.Permission perm) booleanbooleanisOp()booleanisPermissionSet(String name) booleanisPermissionSet(org.bukkit.permissions.Permission perm) net.kyori.adventure.text.Componentname()voidvoidremoveAttachment(org.bukkit.permissions.PermissionAttachment attachment) voidsendMessage(String message) voidsendMessage(String... messages) voidsendMessage(UUID sender, String message) voidsendMessage(UUID sender, String... messages) voidsendMessage(net.kyori.adventure.text.Component message) voidsendRawMessage(String message) voidsendRawMessage(UUID sender, String message) voidsetOp(boolean value) org.bukkit.command.CommandSender.Spigotspigot()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, closeDialog, 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, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showDialog, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.permissions.Permissible
permissionValue, permissionValueMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Field Details
-
delegate
private final org.bukkit.command.CommandSender delegate -
output
-
-
Constructor Details
-
CommandOutputCapture
public CommandOutputCapture(org.bukkit.command.CommandSender delegate)
-
-
Method Details
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
public void sendMessage(net.kyori.adventure.text.Component message) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceorg.bukkit.command.CommandSender
-
getOutput
-
isConversing
public boolean isConversing()- Specified by:
isConversingin interfaceorg.bukkit.conversations.Conversable
-
acceptConversationInput
- Specified by:
acceptConversationInputin interfaceorg.bukkit.conversations.Conversable
-
beginConversation
public boolean beginConversation(org.bukkit.conversations.Conversation conversation) - Specified by:
beginConversationin interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(org.bukkit.conversations.Conversation conversation) - Specified by:
abandonConversationin interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(org.bukkit.conversations.Conversation conversation, org.bukkit.conversations.ConversationAbandonedEvent details) - Specified by:
abandonConversationin interfaceorg.bukkit.conversations.Conversable
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceorg.bukkit.conversations.Conversable
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceorg.bukkit.conversations.Conversable
-
getServer
public org.bukkit.Server getServer()- Specified by:
getServerin interfaceorg.bukkit.command.CommandSender
-
getName
- Specified by:
getNamein interfaceorg.bukkit.command.CommandSender
-
name
public net.kyori.adventure.text.Component name()- Specified by:
namein interfaceorg.bukkit.command.CommandSender
-
isPermissionSet
- Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
isPermissionSet
public boolean isPermissionSet(org.bukkit.permissions.Permission perm) - Specified by:
isPermissionSetin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
- Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
hasPermission
public boolean hasPermission(org.bukkit.permissions.Permission perm) - Specified by:
hasPermissionin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value, int ticks) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, int ticks) - Specified by:
addAttachmentin interfaceorg.bukkit.permissions.Permissible
-
removeAttachment
public void removeAttachment(org.bukkit.permissions.PermissionAttachment attachment) - Specified by:
removeAttachmentin interfaceorg.bukkit.permissions.Permissible
-
recalculatePermissions
public void recalculatePermissions()- Specified by:
recalculatePermissionsin interfaceorg.bukkit.permissions.Permissible
-
getEffectivePermissions
- Specified by:
getEffectivePermissionsin interfaceorg.bukkit.permissions.Permissible
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.bukkit.permissions.ServerOperator
-
setOp
public void setOp(boolean value) - Specified by:
setOpin interfaceorg.bukkit.permissions.ServerOperator
-
spigot
public org.bukkit.command.CommandSender.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.command.CommandSender
-