Class ItemConsumptionAuthenticator
java.lang.Object
io.github.djtpj.authenticator.Authenticator<T>
io.github.djtpj.authenticator.authenticators.PlayerAuthenticator<org.bukkit.event.player.PlayerItemConsumeEvent>
io.github.djtpj.authenticator.authenticators.ItemConsumptionAuthenticator
public class ItemConsumptionAuthenticator
extends PlayerAuthenticator<org.bukkit.event.player.PlayerItemConsumeEvent>
-
Constructor Summary
ConstructorsConstructorDescriptionItemConsumptionAuthenticator(SimpleTrait associatedTrait, org.bukkit.Material... materials) -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticate(org.bukkit.event.player.PlayerItemConsumeEvent event) Verifies weather a trait should run on an eventMethods inherited from class io.github.djtpj.authenticator.authenticators.PlayerAuthenticator
playerHasTrait
-
Constructor Details
-
ItemConsumptionAuthenticator
- Parameters:
associatedTrait- the ability to associate with the Authenticatormaterials- one of the food materials the player must be eating to authenticate (leave empty for all to trigger)
-
-
Method Details
-
authenticate
public boolean authenticate(org.bukkit.event.player.PlayerItemConsumeEvent event) Description copied from class:AuthenticatorVerifies weather a trait should run on an event- Overrides:
authenticatein classPlayerAuthenticator<org.bukkit.event.player.PlayerItemConsumeEvent>- Parameters:
event- The event to authenticate- Returns:
- whether a trait should run on this event
-