public class Interaction extends Object
ViewComponent
then this change is visible to all other players in the interaction.Constructor and Description |
---|
Interaction(Layout layout,
Function<Interaction,GroupComponent> componentTreeGenerator)
Instantiates a new default Interaction.
|
Interaction(Layout layout,
GroupComponent templateComponentTree)
Instantiates a new Interaction.
|
Modifier and Type | Method and Description |
---|---|
void |
click(org.bukkit.entity.Player player,
GuiPoint cursor)
Performs a click for the player at the given cursor position.
|
boolean |
contains(org.bukkit.entity.Player player)
Checks whether a player is taking part in this interaction.
|
GroupComponent |
getComponentTree()
Gets component tree.
|
Layout |
getLayout()
Gets the layout.
|
boolean |
isDefaultInteraction()
Check whether the interaction is a default interaction
|
void |
join(org.bukkit.entity.Player player)
Add a player to this interaction.
|
void |
quit(org.bukkit.entity.Player player)
Remove a player from this interaction.
|
void |
runAfterClick(Runnable task) |
public Interaction(Layout layout, GroupComponent templateComponentTree)
layout
- the layouttemplateComponentTree
- the template component treepublic Interaction(Layout layout, Function<Interaction,GroupComponent> componentTreeGenerator)
layout
- the layoutcomponentTreeGenerator
- the component tree generatorpublic Layout getLayout()
public void join(org.bukkit.entity.Player player)
player
- the playerpublic void quit(org.bukkit.entity.Player player)
player
- the playerpublic boolean contains(org.bukkit.entity.Player player)
player
- the playerpublic void runAfterClick(Runnable task)
public boolean isDefaultInteraction()
public GroupComponent getComponentTree()
public void click(org.bukkit.entity.Player player, GuiPoint cursor)
player
- the playercursor
- the cursorCopyright © 2021. All rights reserved.