Interface CommandSource

All Known Subinterfaces:
Damageable, Entity, LivingEntity, Mob, Player

public interface CommandSource
Since:
0.1.0
  • Method Details

    • location

      Location location()
      Gets the location that this command is being executed at.
      Returns:
      a cloned location instance.
      Since:
      0.1.0
    • sender

      CommandSender sender()
      Gets the CommandSender that executed this command. The sender of a command is the one that triggered the execution of a command. It differs to executor() as the executor can be changed by a command, e.g. /execute.
      Returns:
      the command sender instance
      Since:
      0.1.0
    • executor

      @Nullable Entity executor()
      Gets the entity that executes this command. May not always be sender() as the executor of a command can be changed to a different entity than the one that triggered the command.
      Returns:
      entity that executes this command
      Since:
      0.1.0
    • server

      Server server()
      Gets the server associated with this source.
      Returns:
      the server
      Since:
      0.1.0