Interface ShopLayoutHandler
public interface ShopLayoutHandler
The logic behind the look-and-feel of a
It receives an
The event
ShopLayout
.It receives an
ShopLayoutHandler.OpenEvent
that contains various informations that are needed in that event to display it.The event
build(OpenEvent)
, that gets called whenever it's time to process it, gets called
very frequently, including whenever the player changes his page. You should try to make your code as efficient as possible.
At the end you're gonna return a GUI
, probably of the type ChestGUI
, that will be displayed to the player.
Use methods that are included in your ShopLayoutHandler.OpenEvent
, such as ShopLayoutHandler.OpenEvent.build(ShopPage)
to
construct clickable buttons for the GUI that handle the item purchasing, page changing and etc.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Used to pass information tobuild(OpenEvent)
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(ShopLayoutHandler.OpenEvent event) Gets called when layout is getting opened or when a player changed the page.
-
Method Details
-
build
Gets called when layout is getting opened or when a player changed the page.This method is being called on a separate thread!
- Parameters:
event
- The event of it containing informations- Returns:
- The GUI that shall be shown to the player
-