Interface UpgradeShopLayoutHandler.OpenEvent
- Enclosing interface:
- UpgradeShopLayoutHandler
public static interface UpgradeShopLayoutHandler.OpenEvent
Used to pass information to 
UpgradeShopLayoutHandler.build(OpenEvent)- 
Method SummaryModifier and TypeMethodDescriptionbuild(UpgradeLevel upgradeLevel) Builds a GUIItem that can be used to set the upgrade inside the GUIbuild(UpgradeLevel upgradeLevel, Object data) Builds a GUIItem that can be used to set the upgrade inside the GUI the data is only passed if the purchase was successful@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 title that has been configured by the player.
 That title shall be used when creating the GUIReturns the layout that has been openedReturns the player that opened itReturns the already loaded and ready to use player properties instance of the playerGets all the upgrade levels that should be displayed in the GUIReturns the upgrade state corresponding to the team this gui is selling upgrades for.getUpgradeState(Upgrade upgrade) returns the upgrade state of a specified upgradevoidrefresh()Will reopen the current GUIvoidWill reopen the current GUI
- 
Method Details- 
getLayoutUpgradeShopLayout 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
 
- 
getDefaultGUITitleString getDefaultGUITitle()Returns the title that has been configured by the player.
 That title shall be used when creating the GUI- Returns:
- The title that shall be used in the GUI
 
- 
getUpgradeLevelsList<UpgradeLevel> getUpgradeLevels()Gets all the upgrade levels that should be displayed in the GUI- Returns:
- All the upgrade levels that need to be displayed
 
- 
getUpgradeStateUpgradeState getUpgradeState()Returns the upgrade state corresponding to the team this gui is selling upgrades for.May construct a fake instance in case the player is not within an arena or team. - Returns:
- The current upgrade still
 
- 
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
- 
refreshWill reopen the current GUI- Parameters:
- data- new data
 
- 
getUpgradeStatereturns the upgrade state of a specified upgrade- Parameters:
- upgrade- the upgrade we are checking
- Returns:
- the current UpgradeState
 
- 
buildBuilds a GUIItem that can be used to set the upgrade inside the GUI- Parameters:
- upgradeLevel- the UpgradeLevel this GUIItem will be responsible for
- Returns:
- The item that shall be placed inside the GUI
 
- 
buildBuilds a GUIItem that can be used to set the upgrade inside the GUI the data is only passed if the purchase was successful- Parameters:
- upgradeLevel- the UpgradeLevel this GUIItem will be responsible for
- data- new data passed to the shop layout when the upgrade level is purchases
- Returns:
- The item that shall be placed inside the GUI
 
 
-