Class PersistentDataEvent

java.lang.Object
org.bukkit.event.Event
me.thehandsomeyoni.persistentdataapi.events.manager.PersistentDataEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
BlockPersistentDataDeleteEvent, BlockPersistentDataWriteEvent, ItemPersistentDataDeleteEvent, ItemPersistentDataWriteEvent, PlayerPersistentDataDeleteEvent, PlayerPersistentDataWriteEvent

public abstract class PersistentDataEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
A class that represents a persistent data event.
Since:
1.6.0
Author:
TheHandsomeYoni
  • Constructor Details

    • PersistentDataEvent

      public PersistentDataEvent(AbstractPersistentData persistentData)
      Initializes the PersistentDataEvent with persistentData.
      Parameters:
      persistentData - The persistent data that is being manipulated.
    • PersistentDataEvent

      public PersistentDataEvent(String dataName, Serializable dataValue)
      Initializes the PersistentDataEvent with given data values.
      Parameters:
      dataName - The name of the data.
      dataValue - The value of the data.
  • Method Details

    • getPersistentData

      public abstract AbstractPersistentData getPersistentData()
      Gets the persistent data.
      Returns:
      The persistent data.
    • getDataName

      public abstract String getDataName()
      Gets the name of the data.
      Returns:
      The name of the data.
    • getDataValue

      public abstract Serializable getDataValue()
      Gets the value of the data.
      Returns:
      The value of the data.