Interface GUIPresenter
- All Known Implementing Classes:
BedrockGUIPresenter,CrossPlatformGUIPresenter,InventoryGUIPresenter
public interface GUIPresenter
Class that takes the generated contents of an InventoryGUI and shows it to a player.
To customize an inventory view beyond what this is capable of, simply implements this class
and make your GUI use your version of GUIPresenter.
-
Method Summary
Modifier and TypeMethodDescriptionvoidupdateView(org.bukkit.entity.Player viewer, GUISession session) Will update the viewer's view of the given GUISession.
-
Method Details
-
updateView
Will 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.- 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
-