Package org.bukkit.event.block
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 org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.block.InventoryBlockStartEvent
source
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
Constructor Summary
ConstructorDescriptionBrewingStartEvent
(@NotNull Block furnace, @NotNull ItemStack source, int brewingTime) -
Method Summary
Modifier and TypeMethodDescription@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int
Gets the amount of brewing ticks left.@org.jetbrains.annotations.Range(from=1L, to=2147483647L) int
Gets the recipe time for the brewing process which is used to compute the progress of the brewing process withgetBrewingTime()
.int
Deprecated, for removal: This API element is subject to removal in a future version.void
setBrewingTime
(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int brewTime) Sets the brewing ticks left.void
setRecipeBrewTime
(@org.jetbrains.annotations.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()
.void
setTotalBrewTime
(int brewTime) Deprecated, for removal: This API element is subject to removal in a future version.usesetBrewingTime(int)
insteadMethods inherited from class org.bukkit.event.block.InventoryBlockStartEvent
getHandlerList, getHandlers, getSource
Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
Methods inherited from class org.bukkit.event.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
@Experimental public @org.jetbrains.annotations.Range(from=1L, to=2147483647L) int 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
@Experimental public void setRecipeBrewTime(@org.jetbrains.annotations.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()
.- Parameters:
recipeBrewTime
- recipe brew time (in ticks)- Throws:
IllegalArgumentException
- if the recipe brew time is non-positive
-
getBrewingTime
public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int getBrewingTime()Gets the amount of brewing ticks left.- Returns:
- The amount of ticks left for the brewing task
-
setBrewingTime
public void setBrewingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int brewTime) 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