Package net.fateuhc.plugin.api.data
Class ConfigData
java.lang.Object
net.fateuhc.plugin.api.data.ConfigData
-
Constructor Summary
ConstructorsConstructorDescriptionConfigData(boolean active, boolean defaultActive, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.ConfigData(boolean active, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.ConfigData(int amount, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.ConfigData(int amount, int defaultAmount, boolean editable, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC. -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()What is the alias of the config option?intWhat is the amount the config option is set to?What is the config type of the config option?intWhat is the default amount for the config option?String[]What is the description of the config option?com.cryptomorin.xseries.XMaterialWhat is the material for the config option?getName()What is the name of the config option?booleanisActive()Is the config option active?booleanIs the config option active by default?booleanIs the config option editable?booleanIs the config option only allowed to be edited in the lobby?voidsetActive(boolean active) Change if the config option is active or not.voidsetAmount(int amount) Set the amount the config option should be set to.voidsetEditable(boolean editable) Change if the config option should be editable.org.bukkit.inventory.ItemStackGet the item stack of the config option.
-
Constructor Details
-
ConfigData
public ConfigData(int amount, int defaultAmount, boolean editable, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.- Parameters:
amount- The amount the config item should be set to.defaultAmount- The default amount of the config item.editable- Should the host be able to edit the config option?lobbyModeOnlyEdit- Should the config option only be able to get changed in the lobby?material- What material should be used for the config option?alias- What is the alias of the config option?name- What is the name of the config option?description- What is the description of the config option?
-
ConfigData
public ConfigData(int amount, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.- Parameters:
amount- The amount the config item should be set to.lobbyModeOnlyEdit- Should the config option only be able to get changed in the lobby?material- What material should be used for the config option?alias- What is the alias of the config option?name- What is the name of the config option?description- What is the description of the config option?
-
ConfigData
public ConfigData(boolean active, boolean defaultActive, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.- Parameters:
active- Should the config option be active?defaultActive- Should the config option be active by default?lobbyModeOnlyEdit- Should the config option only be able to get changed in the lobby?material- What material should be used for the config option?alias- What is the alias of the config option?name- What is the name of the config option?description- What is the description of the config option?
-
ConfigData
public ConfigData(boolean active, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description) Register a config option in FateUHC.- Parameters:
active- Should the config option be active?lobbyModeOnlyEdit- Should the config option only be able to get changed in the lobby?material- What material should be used for the config option?alias- What is the alias of the config option?name- What is the name of the config option?description- What is the description of the config option?
-
-
Method Details
-
getName
What is the name of the config option?- Returns:
String
-
getAlias
What is the alias of the config option?- Returns:
String
-
getConfigType
What is the config type of the config option?- Returns:
ConfigType
-
getAmount
public int getAmount()What is the amount the config option is set to?- Returns:
Integer
-
setAmount
public void setAmount(int amount) Set the amount the config option should be set to.- Parameters:
amount- What is the new amount?
-
getDefaultAmount
public int getDefaultAmount()What is the default amount for the config option?- Returns:
Integer
-
isActive
public boolean isActive()Is the config option active?- Returns:
Boolean
-
setActive
public void setActive(boolean active) Change if the config option is active or not.- Parameters:
active- Should the config option be active?
-
isDefaultActive
public boolean isDefaultActive()Is the config option active by default?- Returns:
Boolean
-
isEditable
public boolean isEditable()Is the config option editable?- Returns:
Boolean
-
setEditable
public void setEditable(boolean editable) Change if the config option should be editable.- Parameters:
editable- Should the config option be editable?
-
getDescription
What is the description of the config option?- Returns:
String
-
getMaterial
public com.cryptomorin.xseries.XMaterial getMaterial()What is the material for the config option?- Returns:
XMaterial
-
isLobbyModeOnlyEdit
public boolean isLobbyModeOnlyEdit()Is the config option only allowed to be edited in the lobby?- Returns:
Boolean
-
toItemStack
public org.bukkit.inventory.ItemStack toItemStack()Get the item stack of the config option.- Returns:
ItemStack
-