Class CrossPlatformGUIPresenter

java.lang.Object
me.eddie.inventoryguiapi.gui.view.CrossPlatformGUIPresenter
All Implemented Interfaces:
GUIPresenter

public class CrossPlatformGUIPresenter extends Object implements GUIPresenter
Class that takes the generated contents of an InventoryGUI and shows it to a player, with different presentation implementation depending on the player's platform (Java or Bedrock). This will show an inventory for a Java player and a native Bedrock form for a Bedrock player.
  • Constructor Details

    • CrossPlatformGUIPresenter

      public CrossPlatformGUIPresenter()
  • Method Details

    • updateView

      public void updateView(org.bukkit.entity.Player viewer, GUISession session)
      Description copied from interface: GUIPresenter
      Will update the viewer's view of the given GUISession. This will not recalculate what should be displayed though, instead use InventoryGUI.updateContentsAndView(Player) if this is what you require. This method will also only do it for the provided viewer, in the case of shared inventories use SharedInventoryGUI.updateContentsAndView() to update the view for all viewers. Use synchronized to make this thread-safe if necessary.
      Specified by:
      updateView in interface GUIPresenter
      Parameters:
      viewer - The viewer of the GUI. Or if it's a GUI with multiple viewers, any viewer of the GUI.
      session - The GUISession that determines what should be displayed