public class DataFile
extends java.lang.Object
getInstance()
to access the file and it's
values.Modifier and Type | Method and Description |
---|---|
DataFile |
addCustomItemStack(CustomItemStack cStack)
Converts a
CustomItemStack to a StorageCustomItem to be
saved in the data.yml file. |
DataFile |
addStorageCustomItem(StorageCustomItem sItem)
Add a new
StorageCustomItem to be saved in the data.yml file. |
StorageCustomItem |
getCustomItem(org.bukkit.Material material,
short durability)
Obtains a
StorageCustomItem with the specified values. |
StorageCustomItem |
getCustomItem(java.lang.String idName,
java.lang.String texture)
Obtains a
StorageCustomItem with the specified values. |
org.bukkit.configuration.file.YamlConfiguration |
getData() |
short |
getFreeDurability(org.bukkit.Material material)
Get a durability value that does not use a texture for the specified
Material.
|
static DataFile |
getInstance() |
DataFile |
reloadData()
Reloads the Data File, updating any changes.
|
DataFile |
saveData()
Saves the Data File.
|
DataFile |
setup()
This method is run when the plugin is enabled and when reloading.
|
public static DataFile getInstance()
public DataFile setup()
public DataFile addStorageCustomItem(StorageCustomItem sItem)
StorageCustomItem
to be saved in the data.yml file.
saveData()
to save the changes that you
made.sItem
- - The StorageCustomItem
to store in the data.yml.public DataFile addCustomItemStack(CustomItemStack cStack)
CustomItemStack
to a StorageCustomItem
to be
saved in the data.yml file. saveData()
to save the changes that you
made.cStack
- - The CustomItemStack
to convert and save.public StorageCustomItem getCustomItem(java.lang.String idName, java.lang.String texture)
StorageCustomItem
with the specified values. If the
StorageCustomItem
does not exist, it will return null.idName
- The ID Name of the StorageCustomItem
.texture
- The Texture of the StorageCustomItem
StorageCustomItem
with the above values, as well as
its Material and durability.public StorageCustomItem getCustomItem(org.bukkit.Material material, short durability)
StorageCustomItem
with the specified values. If the
StorageCustomItem
does not exist, it will return null.material
- The Material of the StorageCustomItem
.durability
- The durability of the StorageCustomItem
StorageCustomItem
with the above values, as well as
its ID Name and Texture Name.public short getFreeDurability(org.bukkit.Material material)
material
- The Material for which you want a free durability point.public org.bukkit.configuration.file.YamlConfiguration getData()
YamlConfiguration
of the data.yml file.public DataFile saveData()
public DataFile reloadData()