Interface CompassTargetFilter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CompassTargetFilter
Narrows who a teammate compass may point at.

A filter can only take candidates away: Zentrix first applies its own rules - a living, non-spectating teammate in the same match and world - and only asks the filters about the teammates that pass. It is asked on the main thread, whenever a tracker resolves or cycles its target, so it must be cheap. A filter that throws counts as refusing the candidate.

Since:
1.8.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canTrack(@NotNull org.bukkit.entity.Player tracker, @NotNull org.bukkit.entity.Player target)
     
  • Method Details

    • canTrack

      boolean canTrack(@NotNull @NotNull org.bukkit.entity.Player tracker, @NotNull @NotNull org.bukkit.entity.Player target)
      Parameters:
      tracker - the player holding the compass
      target - a teammate Zentrix would let them track
      Returns:
      whether the compass may point at the target