Interface ShopLayoutHandler.OpenEvent
- Enclosing interface:
- ShopLayoutHandler
public static interface ShopLayoutHandler.OpenEvent
Used to pass information to 
ShopLayoutHandler.build(OpenEvent)- 
Method SummaryModifier and TypeMethodDescriptionBuilds a GUIItem that can be used to set the item inside the GUIdefault GUIItemBuilds a GUIItem that can be used to set the page inside the GUI.
 Also resets the current data back to null once pressedBuilds a GUIItem that can be used to set the page inside the GUIBuilds a GUIItem that will flush any info about the info on click.
 This behavior is similar to as if the player is closing and reopening the shopbuildOffer(ShopItem item) Builds a GUIItem that can be used to set the page inside the villager GUI@Nullable ArenagetArena()Returns the arena the player is a part of.getData()The default value is null<T> TgetData(T def) Returns data that can be used during the sessionReturns the layout that has been opened@Nullable ShopPageThe currently open page
 Can be null when there's no page openAll items that should be displayed to the playergetPages()The available pages with which the handler has to work with
 The collections and EVERYTHING in the collection has been cloned,
 meaning the handler can do anything with it that he wantsReturns the player that opened itReturns the already loaded and ready to use player properties instance of the playerReturns what shall be shown in this given sitation.booleanReturns whether the title of the GUI should be the same as the shop page.voidrefresh()Will reopen the current GUIvoidsetOpenPage(@Nullable ShopPage page) Sets the new open page.
 Won't reopen the GUI when set
- 
Method Details- 
getLayoutShopLayout getLayout()Returns the layout that has been opened- Returns:
- The layout
 
- 
getPlayerPlayer getPlayer()Returns the player that opened it- Returns:
- The player
 
- 
getArenaReturns the arena the player is a part of.- Returns:
- The arena of the player. May be nullof he's in none
 
- 
getPlayerPropertiesPlayerProperties getPlayerProperties()Returns the already loaded and ready to use player properties instance of the player- Returns:
- The PlayerProperties instance of the given player
 
- 
getSituationalGUITitleString getSituationalGUITitle()Returns what shall be shown in this given sitation.The exact value depends on the plugin configuration. 
 Factors include e.g.: WhetherisGUITitleAsShopPage()should be conisdered and what messages have been configured.The plugin does not automatically apply it. Make sure to apply it after setting the shop page. - Returns:
- The title that shall be used in the GUI
 
- 
isGUITitleAsShopPageboolean isGUITitleAsShopPage()Returns whether the title of the GUI should be the same as the shop page.Whether this feature is active depends on the plugin configuration. 
 The plugin will handle this automatically. One edge case is when you have custom pages (e.g. quick buy): In this case you should check if this feature is enabled and set it yourself.- Returns:
- Whether the title of the GUI should be the same as the shop page
 
- 
getPagesThe available pages with which the handler has to work with
 The collections and EVERYTHING in the collection has been cloned,
 meaning the handler can do anything with it that he wants- Returns:
- The available pages
 
- 
getOpenPageThe currently open page
 Can be null when there's no page open- Returns:
- The currently open page
 
- 
setOpenPageSets the new open page.
 Won't reopen the GUI when set- Parameters:
- page- The new open page, can be null
 
- 
getPageItemsAll items that should be displayed to the player- Returns:
- all items that will be displayed
 
- 
getDataObject getData()The default value is null- Returns:
- Data that can be passed around
 
- 
getData<T> T getData(T def) Returns data that can be used during the session- Type Parameters:
- T- (Unsafe operation:) Automatically casts the intern data object to the given generic
- Parameters:
- def- The default value which will be taken if none is set
- Returns:
- Data that can be passed around
 
- 
refreshvoid refresh()Will reopen the current GUI
- 
buildBuilds a GUIItem that can be used to set the item inside the GUI- Parameters:
- item- The item that shall be displayed
- Returns:
- The item that shall be placed inside the GUI
 
- 
buildBuilds a GUIItem that can be used to set the page inside the GUI.
 Also resets the current data back to null once pressed- Parameters:
- page- The page that shall be displayed
- Returns:
- The item that shall be placed inside the GUI
 
- 
buildBuilds a GUIItem that can be used to set the page inside the GUI- Parameters:
- page- The page that shall be displayed
- data- The new data that will be taken after pressing on the page
- Returns:
- The item that shall be placed inside the GUI
 
- 
buildOfferBuilds a GUIItem that can be used to set the page inside the villager GUI- Parameters:
- item- The item that shall be displayed
- Returns:
- The item that shall be placed inside the GUI
 
- 
buildHomeBuilds a GUIItem that will flush any info about the info on click.
 This behavior is similar to as if the player is closing and reopening the shop- Parameters:
- is- The item that shall be presented as the button
- Returns:
- The item that shall be placed inside the GUI
 
 
-