Interface GUIPopulator

All Known Implementing Classes:
LimitedGUIPopulator, UnlimitedGUIPopulator

public interface GUIPopulator
Responsible for Calculating the positions that GUIElements need to go into in the displayed GUI and then updating the current inventory state. To customize an inventory layout beyond what this is capable of, simply implements this class and make your GUI use your version of GUIPopulator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    populateGUI(GUISession session, org.bukkit.entity.Player viewer, Callback<Void> callback)
    Gets, via GUI's contents provider, the items a player should be viewing; figures out what slots they should be displayed in within the inventory; updates the current InventoryState with this and then calls back to the callback.
  • Method Details

    • populateGUI

      void populateGUI(GUISession session, org.bukkit.entity.Player viewer, Callback<Void> callback)
      Gets, via GUI's contents provider, the items a player should be viewing; figures out what slots they should be displayed in within the inventory; updates the current InventoryState with this and then calls back to the callback.
      Parameters:
      session - The GUISession of the GUI being populated
      viewer - The viewer of the GUISession
      callback - Callback to be called back to on completion