public abstract class Menu extends Object
| Modifier and Type | Field and Description |
|---|---|
protected me.hsgamer.hscore.config.Config |
config |
protected List<me.hsgamer.hscore.variable.ExternalStringReplacer> |
stringReplacers |
protected me.hsgamer.hscore.variable.InstanceVariableManager |
variableManager |
| Modifier | Constructor and Description |
|---|---|
protected |
Menu(me.hsgamer.hscore.config.Config config)
Create a new menu
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeReplaced(String string)
Check if the string can be replaced
|
abstract void |
close(org.bukkit.entity.Player player)
Close the menu
|
abstract void |
closeAll()
Close/Clear all inventories of the type
|
abstract boolean |
create(org.bukkit.entity.Player player,
String[] args,
boolean bypass)
Called when opening the menu for the player
|
me.hsgamer.hscore.config.Config |
getConfig()
Get the config
|
String |
getName()
Get the name
|
Optional<Menu> |
getParentMenu(UUID uuid)
Get the former menu that opened this menu
|
List<me.hsgamer.hscore.variable.ExternalStringReplacer> |
getStringReplacers()
Get the mutable string replacers
|
me.hsgamer.hscore.variable.InstanceVariableManager |
getVariableManager()
Get the variable manager
|
String |
replace(String string,
UUID uuid)
Replace the string
|
void |
setParentMenu(UUID uuid,
Menu menu)
Set the former menu
|
abstract void |
update(org.bukkit.entity.Player player)
Called when updating the menu
|
protected final me.hsgamer.hscore.config.Config config
protected final me.hsgamer.hscore.variable.InstanceVariableManager variableManager
protected final List<me.hsgamer.hscore.variable.ExternalStringReplacer> stringReplacers
protected Menu(me.hsgamer.hscore.config.Config config)
config - the configpublic String getName()
public me.hsgamer.hscore.config.Config getConfig()
public me.hsgamer.hscore.variable.InstanceVariableManager getVariableManager()
public List<me.hsgamer.hscore.variable.ExternalStringReplacer> getStringReplacers()
public abstract boolean create(org.bukkit.entity.Player player,
String[] args,
boolean bypass)
player - the player involved inargs - the arguments from the open commandbypass - whether the plugin ignores the permission checkpublic abstract void update(org.bukkit.entity.Player player)
player - the player involved inpublic abstract void close(org.bukkit.entity.Player player)
player - the player involved inpublic abstract void closeAll()
public Optional<Menu> getParentMenu(UUID uuid)
uuid - the unique idpublic void setParentMenu(UUID uuid, Menu menu)
uuid - the unique idmenu - the former menupublic boolean canBeReplaced(String string)
string - the stringCopyright © 2023. All rights reserved.