Class CrossPlatformGUIPresenter
java.lang.Object
me.eddie.inventoryguiapi.gui.view.CrossPlatformGUIPresenter
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateView(org.bukkit.entity.Player viewer, GUISession session) Will update the viewer's view of the given GUISession.
-
Constructor Details
-
CrossPlatformGUIPresenter
public CrossPlatformGUIPresenter()
-
-
Method Details
-
updateView
Description copied from interface:GUIPresenterWill update the viewer's view of the given GUISession. This will not recalculate what should be displayed though, instead useInventoryGUI.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 useSharedInventoryGUI.updateContentsAndView()to update the view for all viewers. Use synchronized to make this thread-safe if necessary.- Specified by:
updateViewin interfaceGUIPresenter- 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
-