Class BrewingStartEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.InventoryBlockStartEvent
org.bukkit.event.block.BrewingStartEvent
Called when a brewing stand starts to brew.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class InventoryBlockStartEvent
sourceFields inherited from class BlockEvent
block -
Constructor Summary
ConstructorsConstructorDescriptionBrewingStartEvent(@NotNull Block brewingStand, @NotNull ItemStack source, int brewingTime) -
Method Summary
Modifier and TypeMethodDescriptionGets the amount of brewing ticks left.Gets the recipe time for the brewing process which is used to compute the progress of the brewing process withgetBrewingTime().intDeprecated, for removal: This API element is subject to removal in a future version.voidsetBrewingTime(@Range(from=0L,to=2147483647L) int brewTime) Sets the brewing ticks left.voidsetRecipeBrewTime(@Range(from=1L,to=2147483647L) int recipeBrewTime) Sets the recipe time for the brewing process which is used to compute the progress of the brewing process withgetBrewingTime().voidsetTotalBrewTime(int brewTime) Deprecated, for removal: This API element is subject to removal in a future version.usesetBrewingTime(int)insteadMethods inherited from class InventoryBlockStartEvent
getHandlerList, getHandlers, getSourceMethods inherited from class BlockEvent
getBlockMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
BrewingStartEvent
-
-
Method Details
-
getTotalBrewTime
Deprecated, for removal: This API element is subject to removal in a future version.usegetBrewingTime()insteadGets the total brew time associated with this event.- Returns:
- the total brew time
-
setTotalBrewTime
Deprecated, for removal: This API element is subject to removal in a future version.usesetBrewingTime(int)insteadSets the total brew time for this event.- Parameters:
brewTime- the new total brew time
-
getRecipeBrewTime
Gets the recipe time for the brewing process which is used to compute the progress of the brewing process withgetBrewingTime().- Returns:
- recipe brew time (in ticks)
-
setRecipeBrewTime
Sets the recipe time for the brewing process which is used to compute the progress of the brewing process withgetBrewingTime().- Parameters:
recipeBrewTime- recipe brew time (in ticks)- Throws:
IllegalArgumentException- if the recipe brew time is non-positive
-
getBrewingTime
-
setBrewingTime
Sets the brewing ticks left.- Parameters:
brewTime- the ticks left, which is no less than 0- Throws:
IllegalArgumentException- if the ticks are less than 0
-
getBrewingTime()instead