Class EntityTargetAuthenticator

java.lang.Object
io.github.djtpj.authenticator.Authenticator<org.bukkit.event.entity.EntityTargetEvent>
io.github.djtpj.authenticator.authenticators.EntityTargetAuthenticator

public class EntityTargetAuthenticator extends Authenticator<org.bukkit.event.entity.EntityTargetEvent>
Checks that the target of an EntityTargetEvent is an applicable player, and that the Entity of the event is one of a specified types.
  • Constructor Details

    • EntityTargetAuthenticator

      public EntityTargetAuthenticator(Trait associatedTrait, org.bukkit.entity.EntityType... requiredType)
      Parameters:
      associatedTrait - the ability to associate with the Authenticator
      requiredType - the type the entity (not the target) must be (if left empty, all EntityTypes will pass through
  • Method Details

    • authenticate

      public boolean authenticate(org.bukkit.event.entity.EntityTargetEvent event)
      Description copied from class: Authenticator
      Verifies weather a trait should run on an event
      Specified by:
      authenticate in class Authenticator<org.bukkit.event.entity.EntityTargetEvent>
      Parameters:
      event - The event to authenticate
      Returns:
      whether a trait should run on this event