Class BuildingItemOfferSession

java.lang.Object
org.kingdoms.managers.buildings.itemoffer.BuildingItemOfferSession
Direct Known Subclasses:
BuildingFuelItemOffer, BuildingRepairItemOffer

public abstract class BuildingItemOfferSession extends Object
  • Field Details

    • building

      public KingdomBuilding<?> building
      Must be the closest building to the item that actually needs the item. If none of the building needs the item, then get the closest one.
    • matchedItem

      public ItemMatcher matchedItem
    • lastBuildingNeedsItem

      protected boolean lastBuildingNeedsItem
    • player

      protected final org.bukkit.entity.Player player
    • droppedItem

      protected final org.bukkit.entity.Item droppedItem
    • droppedLocation

      protected final SimpleLocation droppedLocation
    • droppedItemStack

      protected final org.bukkit.inventory.ItemStack droppedItemStack
  • Constructor Details

    • BuildingItemOfferSession

      protected BuildingItemOfferSession(org.bukkit.entity.Player player, org.bukkit.entity.Item droppedItem, SimpleLocation droppedLocation, org.bukkit.inventory.ItemStack droppedItemStack)
      We gather all the information from the constructor rather than making it ourselves because of performance.
  • Method Details

    • checkBuilding

      public abstract void checkBuilding(KingdomBuilding<?> building)
    • finalizeProcess

      public abstract org.kingdoms.managers.buildings.itemoffer.ItemOfferResult finalizeProcess()
    • compareNeedsAndDistance

      protected boolean compareNeedsAndDistance(KingdomBuilding<?> building, boolean currentFull)