15081a5912
Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
|
|
package org.bukkit.command;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public interface ProxiedCommandSender extends CommandSender, net.kyori.adventure.audience.ForwardingAudience.Single { // Paper
|
|
|
|
/**
|
|
* Returns the CommandSender which triggered this proxied command
|
|
*
|
|
* @return the caller which triggered the command
|
|
*/
|
|
@NotNull
|
|
CommandSender getCaller();
|
|
|
|
/**
|
|
* Returns the CommandSender which is being used to call the command
|
|
*
|
|
* @return the caller which the command is being run as
|
|
*/
|
|
@NotNull
|
|
CommandSender getCallee();
|
|
|
|
// Paper start
|
|
@Override
|
|
default void sendMessage(final net.kyori.adventure.identity.@NotNull Identity source, final net.kyori.adventure.text.@NotNull Component message, final net.kyori.adventure.audience.@NotNull MessageType type) {
|
|
net.kyori.adventure.audience.ForwardingAudience.Single.super.sendMessage(source, message, type);
|
|
}
|
|
|
|
@NotNull
|
|
@Override
|
|
default net.kyori.adventure.audience.Audience audience() {
|
|
return this.getCaller();
|
|
}
|
|
// Paper end
|
|
}
|