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 Summary
ConstructorsConstructorDescriptionEntityTargetAuthenticator(Trait associatedTrait, org.bukkit.entity.EntityType... requiredType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticate(org.bukkit.event.entity.EntityTargetEvent event) Verifies weather a trait should run on an event
-
Constructor Details
-
EntityTargetAuthenticator
public EntityTargetAuthenticator(Trait associatedTrait, org.bukkit.entity.EntityType... requiredType) - Parameters:
associatedTrait- the ability to associate with the AuthenticatorrequiredType- the type the entity (not the target) must be (if left empty, allEntityTypeswill pass through
-
-
Method Details
-
authenticate
public boolean authenticate(org.bukkit.event.entity.EntityTargetEvent event) Description copied from class:AuthenticatorVerifies weather a trait should run on an event- Specified by:
authenticatein classAuthenticator<org.bukkit.event.entity.EntityTargetEvent>- Parameters:
event- The event to authenticate- Returns:
- whether a trait should run on this event
-