Class BusinessSupplyEvent
java.lang.Object
org.bukkit.event.Event
us.teaminceptus.novaconomy.api.events.business.BusinessEvent
us.teaminceptus.novaconomy.api.events.business.BusinessSupplyEvent
- All Implemented Interfaces:
Cancellable
Called before a Business receives an automatic supply from a container, adding the items to its resources.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported intervals for the Supply Event to take placeNested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionBusinessSupplyEvent(@NotNull Business b, @NotNull Iterable<? extends ItemStack> items, @NotNull Iterable<? extends Chest> containers) Creates a new BusinessSupplyEvent.BusinessSupplyEvent(@NotNull Business b, @NotNull Iterable<? extends ItemStack> items, @NotNull Chest... containers) Creates a new BusinessSupplyEvent. -
Method Summary
Modifier and TypeMethodDescriptionFetches an immutable set of the Chest Containers that will have the items taken from.getItems()Fetches a mutable set of the ItemStacks that will be added to the Business's resources.@NotNull LocationFetches the Location of the container involved in this event.booleanvoidsetCancelled(boolean cancelled) 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
-
BusinessSupplyEvent
public BusinessSupplyEvent(@NotNull @NotNull Business b, @NotNull @NotNull Iterable<? extends ItemStack> items, @NotNull @NotNull Chest... containers) Creates a new BusinessSupplyEvent.- Parameters:
b- Business Suppliedcontainers- Array of Containers Supplied From
-
BusinessSupplyEvent
public BusinessSupplyEvent(@NotNull @NotNull Business b, @NotNull @NotNull Iterable<? extends ItemStack> items, @NotNull @NotNull Iterable<? extends Chest> containers) Creates a new BusinessSupplyEvent.- Parameters:
b- Business Suppliedcontainers- Iterable of Containers Supplied From
-
-
Method Details
-
getLocation
Fetches the Location of the container involved in this event.- Returns:
- Location of Container
-
getContainers
Fetches an immutable set of the Chest Containers that will have the items taken from.- Returns:
- Chest Containers
-
getItems
Fetches a mutable set of the ItemStacks that will be added to the Business's resources.- Returns:
- Mutable Set of Items
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-