Class LocationTarget

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

public final class LocationTarget extends Object implements Target
A Target implementation representing a specific Block or World Location.
  • Constructor Details

    • LocationTarget

      public LocationTarget(@NotNull @NotNull org.bukkit.Location location)
      Constructs a LocationTarget.
      Parameters:
      location - the targeted location
  • 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

      @Nullable public @Nullable 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