Class EntityTarget

java.lang.Object
org.yuemi.mmomechanics.api.skill.target.EntityTarget
All Implemented Interfaces:
Target

public final class EntityTarget extends Object implements Target
A Target implementation representing a specific Entity.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityTarget(@NotNull org.bukkit.entity.Entity entity)
    Constructs an EntityTarget.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    @NotNull org.bukkit.entity.Entity
    Gets this target as a Bukkit Entity, if applicable.
    @NotNull org.bukkit.Location
    Gets the location of this target.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.yuemi.mmomechanics.api.skill.target.Target

    isEntity
  • Constructor Details

    • EntityTarget

      public EntityTarget(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Constructs an EntityTarget.
      Parameters:
      entity - the targeted entity
  • Method Details

    • getLocation

      @NotNull public @NotNull org.bukkit.Location getLocation()
      Description copied from interface: Target
      Gets the location of this target.
      Specified by:
      getLocation in interface Target
      Returns:
      the target location
    • getAsEntity

      @NotNull public @NotNull org.bukkit.entity.Entity getAsEntity()
      Description copied from interface: Target
      Gets this target as a Bukkit Entity, if applicable.
      Specified by:
      getAsEntity in interface Target
      Returns:
      the target entity, or null if it represents a location
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object