Class BehaviorProvider
java.lang.Object
org.reprogle.honeypot.common.providers.BehaviorProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BehaviorTypeprotected final org.bukkit.Materialprotected final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanOverride default equals function to provide comparison support to BehaviorProviders.Return the type of the behavior.org.bukkit.MaterialgetIcon()Return the type of the behavior.This should return the name of the behavior providerinthashCode()abstract booleanprocess(org.bukkit.entity.Player p, org.bukkit.block.Block block) A method to be executed when an action requires processing.
-
Field Details
-
providerName
-
behaviorType
-
icon
protected final org.bukkit.Material icon
-
-
Constructor Details
-
BehaviorProvider
public BehaviorProvider()
-
-
Method Details
-
getProviderName
This should return the name of the behavior provider- Returns:
- The name of the behavior provider
-
getBehaviorType
Return the type of the behavior. Currently type has no use- Returns:
- The name of the behavior provider
-
getIcon
public org.bukkit.Material getIcon()Return the type of the behavior. Currently, type has no use- Returns:
- The name of the behavior provider
-
equals
Override default equals function to provide comparison support to BehaviorProviders. Since BehaviorProviders must have unique names, this checks against name only -
hashCode
public int hashCode() -
process
public abstract boolean process(org.bukkit.entity.Player p, @Nullable org.bukkit.block.Block block) A method to be executed when an action requires processing. This is ignored if theBehaviorTypeis not set toBehaviorTypes.CUSTOM- Parameters:
p- ThePlayerwho the behavior provider will process against- Returns:
- Your behavior provider should return true if the processing is successful, otherwise return false.
-