Class PersistentDataAPI

java.lang.Object
me.thehandsomeyoni.persistentdataapi.PersistentDataAPI

public final class PersistentDataAPI extends Object
The class that initializes the API.
Version:
1.9.0-ALPHA
Author:
TheHandsomeYoni
  • 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

      public DataRegistry getDataRegistry(org.bukkit.entity.Player player)
      Gets the instance of the DataRegistry.
      Returns:
      The DataRegistry of the given player.
    • getDataRegistry

      public DataRegistry getDataRegistry(org.bukkit.inventory.ItemStack item)
      Gets the instance of the DataRegistry.
      Parameters:
      item - The DataRegistry of the given item.
      Returns:
      The DataRegistry of the given item.
    • getDataRegistry

      public DataRegistry getDataRegistry(org.bukkit.block.Block block) throws UnacceptableBlockException
      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

      public static PersistentDataAPI 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.