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

public class BusinessSupplyEvent extends BusinessEvent implements Cancellable
Called before a Business receives an automatic supply from a container, adding the items to its resources.
  • 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 Supplied
      containers - 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 Supplied
      containers - Iterable of Containers Supplied From
  • Method Details

    • getLocation

      @NotNull public @NotNull Location getLocation()
      Fetches the Location of the container involved in this event.
      Returns:
      Location of Container
    • getContainers

      @NotNull public @NotNull Set<Chest> getContainers()
      Fetches an immutable set of the Chest Containers that will have the items taken from.
      Returns:
      Chest Containers
    • getItems

      @NotNull public @NotNull Set<ItemStack> 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:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable