diff --git a/paper-api/src/main/java/org/bukkit/command/ProxiedCommandSender.java b/paper-api/src/main/java/org/bukkit/command/ProxiedCommandSender.java new file mode 100644 index 0000000000..24c4ebad53 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/command/ProxiedCommandSender.java @@ -0,0 +1,20 @@ + +package org.bukkit.command; + +public interface ProxiedCommandSender extends CommandSender { + + /** + * Returns the CommandSender which triggered this proxied command + * + * @return the caller which triggered the command + */ + CommandSender getCaller(); + + /** + * Returns the CommandSender which is being used to call the command + * + * @return the caller which the command is being run as + */ + CommandSender getCallee(); + +} diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 9fa886f633..de7815fee3 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -10,12 +10,13 @@ import org.bukkit.util.Vector; import java.util.List; import java.util.UUID; +import org.bukkit.command.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; /** * Represents a base entity in the world */ -public interface Entity extends Metadatable { +public interface Entity extends Metadatable, CommandSender { /** * Gets the entity's current position