Package org.bukkit.event.entity
Class VillagerReplenishTradeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.VillagerReplenishTradeEvent
- All Implemented Interfaces:
- Cancellable
Called when a 
Villager is about to restock one of its trades.
 
 If this event passes, the villager will reset the
 uses of the affected MerchantRecipe to 0.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescription
- 
Method SummaryModifier and TypeMethodDescriptionintgetBonus()Deprecated.MC 1.14 has changed how villagers restock their trades.Returns the Entity involved in this eventstatic @NotNull HandlerListGet the recipe to replenish.booleanGets the cancellation state of this event.voidsetBonus(int bonus) Deprecated.MC 1.14 has changed how villagers restock their trades.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetRecipe(@NotNull MerchantRecipe recipe) Set the recipe to replenish.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
VillagerReplenishTradeEventpublic VillagerReplenishTradeEvent(@NotNull @NotNull AbstractVillager what, @NotNull @NotNull MerchantRecipe recipe) 
 
- 
- 
Method Details- 
getRecipeGet the recipe to replenish.- Returns:
- the replenished recipe
 
- 
setRecipeSet the recipe to replenish.- Parameters:
- recipe- the replenished recipe
 
- 
getBonusDeprecated.MC 1.14 has changed how villagers restock their trades. UseMerchantRecipe.getUses().Get the bonus uses added.- Returns:
- the extra uses added
 
- 
setBonusDeprecated.MC 1.14 has changed how villagers restock their trades. This has no effect anymore.Set the bonus uses added.- Parameters:
- bonus- the extra uses added
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-