mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Allow Entities to be CommandSenders and add ProxiedCommandSender
This commit is contained in:
parent
8effa51854
commit
3c1f461070
2 changed files with 22 additions and 1 deletions
20
src/main/java/org/bukkit/command/ProxiedCommandSender.java
Normal file
20
src/main/java/org/bukkit/command/ProxiedCommandSender.java
Normal file
|
@ -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();
|
||||
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue