Class CloudCraftingGrid

java.lang.Object
org.cloudburstmc.server.inventory.BaseInventory
org.cloudburstmc.server.inventory.CloudCraftingGrid
All Implemented Interfaces:
org.cloudburstmc.api.crafting.CraftingGrid, org.cloudburstmc.api.inventory.Inventory

public class CloudCraftingGrid extends BaseInventory implements org.cloudburstmc.api.crafting.CraftingGrid
  • Field Details

    • CRAFTING_GRID_SMALL_OFFSET

      public static final int CRAFTING_GRID_SMALL_OFFSET
      See Also:
      Constant Field Values
    • CRAFTING_GRID_LARGE_OFFSET

      public static final int CRAFTING_GRID_LARGE_OFFSET
      See Also:
      Constant Field Values
    • CRAFTING_RESULT_OFFSET

      public static final int CRAFTING_RESULT_OFFSET
      See Also:
      Constant Field Values
    • CRAFTING_RESULT_SLOT

      public static final int CRAFTING_RESULT_SLOT
      See Also:
      Constant Field Values
  • Constructor Details

    • CloudCraftingGrid

      public CloudCraftingGrid(CloudPlayer holder)
  • Method Details

    • getHolder

      public CloudPlayer getHolder()
      Specified by:
      getHolder in interface org.cloudburstmc.api.crafting.CraftingGrid
      Specified by:
      getHolder in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      getHolder in class BaseInventory
    • getCraftingGridType

      public org.cloudburstmc.api.crafting.CraftingGrid.Type getCraftingGridType()
      Specified by:
      getCraftingGridType in interface org.cloudburstmc.api.crafting.CraftingGrid
    • setCraftingGridType

      public void setCraftingGridType(org.cloudburstmc.api.crafting.CraftingGrid.Type type)
    • getCraftingResult

      public CloudItemStack getCraftingResult()
      Specified by:
      getCraftingResult in interface org.cloudburstmc.api.crafting.CraftingGrid
    • setItem

      public boolean setItem(int index, org.cloudburstmc.api.item.ItemStack item, boolean send)
      Specified by:
      setItem in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      setItem in class BaseInventory
    • getItem

      public @NonNull CloudItemStack getItem(int index)
      Specified by:
      getItem in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      getItem in class BaseInventory
    • decrementCount

      public void decrementCount(int slot)
      Specified by:
      decrementCount in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      decrementCount in class BaseInventory
    • incrementCount

      public void incrementCount(int slot)
      Specified by:
      incrementCount in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      incrementCount in class BaseInventory
    • resetCraftingGrid

      public void resetCraftingGrid()
      Specified by:
      resetCraftingGrid in interface org.cloudburstmc.api.crafting.CraftingGrid
    • getSize

      public int getSize()
      Specified by:
      getSize in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      getSize in class BaseInventory
    • sendSlot

      public void sendSlot(int index, org.cloudburstmc.api.player.Player... players)
      Specified by:
      sendSlot in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      sendSlot in class BaseInventory