Class BusinessProductAddEvent
java.lang.Object
org.bukkit.event.Event
us.teaminceptus.novaconomy.api.events.business.BusinessEvent
us.teaminceptus.novaconomy.api.events.business.BusinessProductAddEvent
- All Implemented Interfaces:
Cancellable
Called before a Business Product is created
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionBusinessProductAddEvent(@NotNull BusinessProduct pr) Constructs a BusinessProductAddEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull BusinessProductFetches the BusinessProduct involved in this event.booleanFetches if the product shouldn't be created.voidsetCancelled(boolean cancelled) Sets if the product shouldn't be created.voidsetProduct(@NotNull BusinessProduct product) Sets the Product to be added.Methods inherited from class us.teaminceptus.novaconomy.api.events.business.BusinessEvent
getBusiness, getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
BusinessProductAddEvent
Constructs a BusinessProductAddEvent.- Parameters:
pr- Product used- Throws:
NullPointerException- if Product is null
-
-
Method Details
-
getProduct
Fetches the BusinessProduct involved in this event.- Returns:
- Product added
-
isCancelled
public boolean isCancelled()Fetches if the product shouldn't be created.- Specified by:
isCancelledin interfaceCancellable- Returns:
- true if not created, else false
-
setCancelled
public void setCancelled(boolean cancelled) Sets if the product shouldn't be created.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancelled- true if not created, else false
-
setProduct
Sets the Product to be added.- Parameters:
product- Product that will be added
-