13
0
geforkt von Mirrors/Paper

API for creating command sender which forwards feedback

Dieser Commit ist enthalten in:
Jason Penilla 2022-02-01 15:51:44 -07:00
Ursprung 5ac3ad3792
Commit 23d50f8134
2 geänderte Dateien mit 26 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -1595,6 +1595,20 @@ public final class Bukkit {
return server.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 static CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super net.kyori.adventure.text.Component> feedback) {
return server.createCommandSender(feedback);
}
// Paper end
/**
* Gets the folder that contains all of the various {@link World}s.
*

Datei anzeigen

@ -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.
*