-
Notifications
You must be signed in to change notification settings - Fork 0
Custom States & Triggers
To create a custom Break State or Trigger you'll need to create a new class which extends BreakState or BreakTrigger respectively. You'll need to overwrite different methods to define how the state/trigger will work:
type() returns the string needed to put in the configuration to load the state.
activeState(BreakingBlock) returns true if the state conditions are met.
getStateValue(BreakingBlock) returns the value to subtract from the hardness.
register(ConfigurationSection) is called when the state is loaded from the config.
(This is usually where you load the different arguments)
type() returns the string needed to put in the configuration to load the state.
execute(Player, Block) the code to run when triggered.
register(ConfigurationSection) is called when the trigger is loaded from the config.
(This is usually where you load the different arguments)
