mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
API for creating command sender which forwards feedback
This commit is contained in:
@@ -1349,6 +1349,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
public ConsoleCommandSender getConsoleSender();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Creates a special {@link CommandSender} which redirects command feedback (in the form of chat messages) to the
|
||||
* specified listener. The returned sender will have the same effective permissions as {@link #getConsoleSender()}.
|
||||
*
|
||||
* @param feedback feedback listener
|
||||
* @return a command sender
|
||||
*/
|
||||
@NotNull
|
||||
public CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super net.kyori.adventure.text.Component> feedback);
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Gets the folder that contains all of the various {@link World}s.
|
||||
*
|
||||
|
Reference in New Issue
Block a user