Class PersistentDataAPI
java.lang.Object
me.thehandsomeyoni.persistentdataapi.PersistentDataAPI
The class that initializes the API.
- Version:
- 1.9.0-ALPHA
- Author:
- TheHandsomeYoni
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentDataAPI
(org.bukkit.plugin.java.JavaPlugin plugin) Initializes the PersistentDataAPI. -
Method Summary
Modifier and TypeMethodDescriptiongetBukkitSerializer
(org.bukkit.persistence.PersistentDataContainer container) Gets the instance of BukkitSerializer to a given data container.getDataRegistry
(org.bukkit.block.Block block) Gets the instance of the DataRegistry.getDataRegistry
(org.bukkit.entity.Player player) Gets the instance of the DataRegistry.getDataRegistry
(org.bukkit.inventory.ItemStack item) Gets the instance of the DataRegistry.static PersistentDataAPI
Gets the instance of the PersistentDataAPI.static org.bukkit.plugin.java.JavaPlugin
Gets the plugin that the API is being used in.
-
Constructor Details
-
PersistentDataAPI
public PersistentDataAPI(org.bukkit.plugin.java.JavaPlugin plugin) Initializes the PersistentDataAPI.- Parameters:
plugin
- The plugin that the API is being used in.
-
-
Method Details
-
getDataRegistry
Gets the instance of the DataRegistry.- Returns:
- The DataRegistry of the given player.
-
getDataRegistry
Gets the instance of the DataRegistry.- Parameters:
item
- The DataRegistry of the given item.- Returns:
- The DataRegistry of the given item.
-
getDataRegistry
Gets the instance of the DataRegistry.- Parameters:
block
- The DataRegistry of the given block.- Returns:
- The DataRegistry of the given block.
- Throws:
UnacceptableBlockException
-
getBukkitSerializer
public SerializableBukkit getBukkitSerializer(org.bukkit.persistence.PersistentDataContainer container) Gets the instance of BukkitSerializer to a given data container.- Parameters:
container
- The given data container.- Returns:
- The BukkitSerializer to the given data container.
-
getInstance
Gets the instance of the PersistentDataAPI.- Returns:
- The instance of the PersistentDataAPI.
-
getJavaPlugin
public static org.bukkit.plugin.java.JavaPlugin getJavaPlugin()Gets the plugin that the API is being used in.- Returns:
- The plugin that the API is being used in.
-